[WATCHDOG] iTCO_wdt: clean up probe(), modify err msg

It's possible that the platform is not allowing reboot via TCO timer
expiration.

Also, differentiate between not finding a chipset that has TCO, and the case
where TCO is present but the driver fails to initialize for some reason.

Signed-off-by: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

authored by Naga Chumbalkar and committed by Wim Van Sebroeck ec26985b f538ed9e

+9 -10
+9 -10
drivers/watchdog/iTCO_wdt.c
··· 698 if (iTCO_wdt_private.iTCO_version == 2) { 699 pci_read_config_dword(pdev, 0xf0, &base_address); 700 if ((base_address & 1) == 0) { 701 - printk(KERN_ERR PFX "RCBA is disabled by harddware\n"); 702 ret = -ENODEV; 703 goto out; 704 } ··· 708 709 /* Check chipset's NO_REBOOT bit */ 710 if (iTCO_wdt_unset_NO_REBOOT_bit() && iTCO_vendor_check_noreboot_on()) { 711 - printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, " 712 - "reboot disabled by hardware\n"); 713 ret = -ENODEV; /* Cannot reset NO_REBOOT bit */ 714 goto out_unmap; 715 } ··· 805 806 static int __devinit iTCO_wdt_probe(struct platform_device *dev) 807 { 808 int found = 0; 809 struct pci_dev *pdev = NULL; 810 const struct pci_device_id *ent; ··· 815 for_each_pci_dev(pdev) { 816 ent = pci_match_id(iTCO_wdt_pci_tbl, pdev); 817 if (ent) { 818 - if (!(iTCO_wdt_init(pdev, ent, dev))) { 819 - found++; 820 break; 821 - } 822 } 823 } 824 825 - if (!found) { 826 printk(KERN_INFO PFX "No card detected\n"); 827 - return -ENODEV; 828 - } 829 830 - return 0; 831 } 832 833 static int __devexit iTCO_wdt_remove(struct platform_device *dev)
··· 698 if (iTCO_wdt_private.iTCO_version == 2) { 699 pci_read_config_dword(pdev, 0xf0, &base_address); 700 if ((base_address & 1) == 0) { 701 + printk(KERN_ERR PFX "RCBA is disabled by hardware\n"); 702 ret = -ENODEV; 703 goto out; 704 } ··· 708 709 /* Check chipset's NO_REBOOT bit */ 710 if (iTCO_wdt_unset_NO_REBOOT_bit() && iTCO_vendor_check_noreboot_on()) { 711 + printk(KERN_INFO PFX "unable to reset NO_REBOOT flag, " 712 + "platform may have disabled it\n"); 713 ret = -ENODEV; /* Cannot reset NO_REBOOT bit */ 714 goto out_unmap; 715 } ··· 805 806 static int __devinit iTCO_wdt_probe(struct platform_device *dev) 807 { 808 + int ret = -ENODEV; 809 int found = 0; 810 struct pci_dev *pdev = NULL; 811 const struct pci_device_id *ent; ··· 814 for_each_pci_dev(pdev) { 815 ent = pci_match_id(iTCO_wdt_pci_tbl, pdev); 816 if (ent) { 817 + found++; 818 + ret = iTCO_wdt_init(pdev, ent, dev); 819 + if (!ret) 820 break; 821 } 822 } 823 824 + if (!found) 825 printk(KERN_INFO PFX "No card detected\n"); 826 827 + return ret; 828 } 829 830 static int __devexit iTCO_wdt_remove(struct platform_device *dev)