diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-08 18:35:30 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-08 18:35:30 +0300 |
commit | d4bab1b091be4a91a7363118c9ede3cc9a7fefd4 (patch) | |
tree | b473b1bb53ef0fec027023ea6f419ea9894465dd /drivers/watchdog/iTCO_wdt.c | |
parent | 56b78921c32ae825c596c158e74ab48c0e8e280d (diff) | |
parent | 2786095a58fd55931fa0298ff6e3914331edaaf2 (diff) | |
download | linux-d4bab1b091be4a91a7363118c9ede3cc9a7fefd4.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
[WATCHDOG] i6300esb.c: change platform_driver to pci_driver
[WATCHDOG] i6300esb: fix unlock register with
[WATCHDOG] drivers/watchdog/wdt.c:wdt_ioctl(): make `ident' non-static
[WATCHDOG] change reboot_notifier to platform-shutdown method.
[WATCHDOG] watchdog_info constify
[WATCHDOG] gef_wdt: Author corrections following split of GE Fanuc joint venture
[WATCHDOG] iTCO_wdt: clean up probe(), modify err msg
[WATCHDOG] ep93xx: watchdog timer driver for TS-72xx SBCs cleanup
[WATCHDOG] support for max63xx watchdog timer chips
[WATCHDOG] ep93xx: added platform side support for TS-72xx WDT driver
[WATCHDOG] ep93xx: implemented watchdog timer driver for TS-72xx SBCs
Diffstat (limited to 'drivers/watchdog/iTCO_wdt.c')
-rw-r--r-- | drivers/watchdog/iTCO_wdt.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c index 4bdb7f1a9077..44bc6aa46edf 100644 --- a/drivers/watchdog/iTCO_wdt.c +++ b/drivers/watchdog/iTCO_wdt.c @@ -584,7 +584,7 @@ static long iTCO_wdt_ioctl(struct file *file, unsigned int cmd, int new_heartbeat; void __user *argp = (void __user *)arg; int __user *p = argp; - static struct watchdog_info ident = { + static const struct watchdog_info ident = { .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE, @@ -698,7 +698,7 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev, if (iTCO_wdt_private.iTCO_version == 2) { pci_read_config_dword(pdev, 0xf0, &base_address); if ((base_address & 1) == 0) { - printk(KERN_ERR PFX "RCBA is disabled by harddware\n"); + printk(KERN_ERR PFX "RCBA is disabled by hardware\n"); ret = -ENODEV; goto out; } @@ -708,8 +708,8 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev, /* Check chipset's NO_REBOOT bit */ if (iTCO_wdt_unset_NO_REBOOT_bit() && iTCO_vendor_check_noreboot_on()) { - printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, " - "reboot disabled by hardware\n"); + printk(KERN_INFO PFX "unable to reset NO_REBOOT flag, " + "platform may have disabled it\n"); ret = -ENODEV; /* Cannot reset NO_REBOOT bit */ goto out_unmap; } @@ -805,6 +805,7 @@ static void __devexit iTCO_wdt_cleanup(void) static int __devinit iTCO_wdt_probe(struct platform_device *dev) { + int ret = -ENODEV; int found = 0; struct pci_dev *pdev = NULL; const struct pci_device_id *ent; @@ -814,19 +815,17 @@ static int __devinit iTCO_wdt_probe(struct platform_device *dev) for_each_pci_dev(pdev) { ent = pci_match_id(iTCO_wdt_pci_tbl, pdev); if (ent) { - if (!(iTCO_wdt_init(pdev, ent, dev))) { - found++; + found++; + ret = iTCO_wdt_init(pdev, ent, dev); + if (!ret) break; - } } } - if (!found) { + if (!found) printk(KERN_INFO PFX "No card detected\n"); - return -ENODEV; - } - return 0; + return ret; } static int __devexit iTCO_wdt_remove(struct platform_device *dev) |