forked from analogdevicesinc/linux
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: [WATCHDOG] improve machzwd detection [WATCHDOG] use ENOTTY instead of ENOIOCTLCMD in ioctl() [WATCHDOG] s3c24XX nowayout [WATCHDOG] pnx4008: add cpu_relax() [WATCHDOG] pnx4008_wdt.c - spinlock fixes. [WATCHDOG] pnx4008_wdt.c - remove patch [WATCHDOG] pnx4008_wdt.c - nowayout patch [WATCHDOG] pnx4008: add watchdog support [WATCHDOG] i8xx_tco remove pci_find_device. [WATCHDOG] alim remove pci_find_device
- Loading branch information
Showing
48 changed files
with
472 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -277,7 +277,7 @@ static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u | |
case WDIOC_GETTIMEOUT: | ||
return put_user(timeout, p); | ||
default: | ||
return -ENOIOCTLCMD; | ||
return -ENOTTY; | ||
} | ||
} | ||
|
||
|
@@ -333,6 +333,7 @@ static void __exit alim7101_wdt_unload(void) | |
/* Deregister */ | ||
misc_deregister(&wdt_miscdev); | ||
unregister_reboot_notifier(&wdt_notifier); | ||
pci_dev_put(alim7101_pmu); | ||
} | ||
|
||
static int __init alim7101_wdt_init(void) | ||
|
@@ -342,7 +343,8 @@ static int __init alim7101_wdt_init(void) | |
char tmp; | ||
|
||
printk(KERN_INFO PFX "Steve Hill <[email protected]>.\n"); | ||
alim7101_pmu = pci_find_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101,NULL); | ||
alim7101_pmu = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101, | ||
NULL); | ||
if (!alim7101_pmu) { | ||
printk(KERN_INFO PFX "ALi M7101 PMU not present - WDT not set\n"); | ||
return -EBUSY; | ||
|
@@ -351,21 +353,23 @@ static int __init alim7101_wdt_init(void) | |
/* Set the WDT in the PMU to 1 second */ | ||
pci_write_config_byte(alim7101_pmu, ALI_7101_WDT, 0x02); | ||
|
||
ali1543_south = pci_find_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL); | ||
ali1543_south = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, | ||
NULL); | ||
if (!ali1543_south) { | ||
printk(KERN_INFO PFX "ALi 1543 South-Bridge not present - WDT not set\n"); | ||
return -EBUSY; | ||
goto err_out; | ||
} | ||
pci_read_config_byte(ali1543_south, 0x5e, &tmp); | ||
pci_dev_put(ali1543_south); | ||
if ((tmp & 0x1e) == 0x00) { | ||
if (!use_gpio) { | ||
printk(KERN_INFO PFX "Detected old alim7101 revision 'a1d'. If this is a cobalt board, set the 'use_gpio' module parameter.\n"); | ||
return -EBUSY; | ||
goto err_out; | ||
} | ||
nowayout = 1; | ||
} else if ((tmp & 0x1e) != 0x12 && (tmp & 0x1e) != 0x00) { | ||
printk(KERN_INFO PFX "ALi 1543 South-Bridge does not have the correct revision number (???1001?) - WDT not set\n"); | ||
return -EBUSY; | ||
goto err_out; | ||
} | ||
|
||
if(timeout < 1 || timeout > 3600) /* arbitrary upper limit */ | ||
|
@@ -404,6 +408,7 @@ static int __init alim7101_wdt_init(void) | |
err_out_miscdev: | ||
misc_deregister(&wdt_miscdev); | ||
err_out: | ||
pci_dev_put(alim7101_pmu); | ||
return rc; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.