aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/iTCO_wdt.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2010-03-19 03:05:10 -0400
committerJens Axboe <jens.axboe@oracle.com>2010-03-19 03:05:10 -0400
commitb4b7a4ef097f288f724420b473dbf92a89c0ab7e (patch)
tree23ad8101e3e77c32a8d1e1b95a9c1cd7f7a475b7 /drivers/watchdog/iTCO_wdt.c
parente9ce335df51ff782035a15c261a3c0c9892a1767 (diff)
parenta3d3203e4bb40f253b1541e310dc0f9305be7c84 (diff)
Merge branch 'master' into for-linus
Conflicts: block/Kconfig Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/watchdog/iTCO_wdt.c')
-rw-r--r--drivers/watchdog/iTCO_wdt.c21
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,
584 int new_heartbeat; 584 int new_heartbeat;
585 void __user *argp = (void __user *)arg; 585 void __user *argp = (void __user *)arg;
586 int __user *p = argp; 586 int __user *p = argp;
587 static struct watchdog_info ident = { 587 static const struct watchdog_info ident = {
588 .options = WDIOF_SETTIMEOUT | 588 .options = WDIOF_SETTIMEOUT |
589 WDIOF_KEEPALIVEPING | 589 WDIOF_KEEPALIVEPING |
590 WDIOF_MAGICCLOSE, 590 WDIOF_MAGICCLOSE,
@@ -698,7 +698,7 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,
698 if (iTCO_wdt_private.iTCO_version == 2) { 698 if (iTCO_wdt_private.iTCO_version == 2) {
699 pci_read_config_dword(pdev, 0xf0, &base_address); 699 pci_read_config_dword(pdev, 0xf0, &base_address);
700 if ((base_address & 1) == 0) { 700 if ((base_address & 1) == 0) {
701 printk(KERN_ERR PFX "RCBA is disabled by harddware\n"); 701 printk(KERN_ERR PFX "RCBA is disabled by hardware\n");
702 ret = -ENODEV; 702 ret = -ENODEV;
703 goto out; 703 goto out;
704 } 704 }
@@ -708,8 +708,8 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,
708 708
709 /* Check chipset's NO_REBOOT bit */ 709 /* Check chipset's NO_REBOOT bit */
710 if (iTCO_wdt_unset_NO_REBOOT_bit() && iTCO_vendor_check_noreboot_on()) { 710 if (iTCO_wdt_unset_NO_REBOOT_bit() && iTCO_vendor_check_noreboot_on()) {
711 printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, " 711 printk(KERN_INFO PFX "unable to reset NO_REBOOT flag, "
712 "reboot disabled by hardware\n"); 712 "platform may have disabled it\n");
713 ret = -ENODEV; /* Cannot reset NO_REBOOT bit */ 713 ret = -ENODEV; /* Cannot reset NO_REBOOT bit */
714 goto out_unmap; 714 goto out_unmap;
715 } 715 }
@@ -805,6 +805,7 @@ static void __devexit iTCO_wdt_cleanup(void)
805 805
806static int __devinit iTCO_wdt_probe(struct platform_device *dev) 806static int __devinit iTCO_wdt_probe(struct platform_device *dev)
807{ 807{
808 int ret = -ENODEV;
808 int found = 0; 809 int found = 0;
809 struct pci_dev *pdev = NULL; 810 struct pci_dev *pdev = NULL;
810 const struct pci_device_id *ent; 811 const struct pci_device_id *ent;
@@ -814,19 +815,17 @@ static int __devinit iTCO_wdt_probe(struct platform_device *dev)
814 for_each_pci_dev(pdev) { 815 for_each_pci_dev(pdev) {
815 ent = pci_match_id(iTCO_wdt_pci_tbl, pdev); 816 ent = pci_match_id(iTCO_wdt_pci_tbl, pdev);
816 if (ent) { 817 if (ent) {
817 if (!(iTCO_wdt_init(pdev, ent, dev))) { 818 found++;
818 found++; 819 ret = iTCO_wdt_init(pdev, ent, dev);
820 if (!ret)
819 break; 821 break;
820 }
821 } 822 }
822 } 823 }
823 824
824 if (!found) { 825 if (!found)
825 printk(KERN_INFO PFX "No card detected\n"); 826 printk(KERN_INFO PFX "No card detected\n");
826 return -ENODEV;
827 }
828 827
829 return 0; 828 return ret;
830} 829}
831 830
832static int __devexit iTCO_wdt_remove(struct platform_device *dev) 831static int __devexit iTCO_wdt_remove(struct platform_device *dev)