aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog/alim1535_wdt.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2006-07-18 12:30:00 -0400
committerWim Van Sebroeck <wim@iguana.be>2006-10-02 16:55:51 -0400
commit02be2ee9e0797b6f657827e32345f0bfeae4c20e (patch)
tree0e04411b5337763b77c6ddf103cd9bc556d6c103 /drivers/char/watchdog/alim1535_wdt.c
parent95f3eff6997ae4a6754c1d874ec0a414d97c44d1 (diff)
[WATCHDOG] alim remove pci_find_device
Convert pci_find_device to pci_get_device + pci_dev_put in alim watchdog cards' drivers (refcounting). Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'drivers/char/watchdog/alim1535_wdt.c')
-rw-r--r--drivers/char/watchdog/alim1535_wdt.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/char/watchdog/alim1535_wdt.c b/drivers/char/watchdog/alim1535_wdt.c
index c5c94e4c9495..0b2c8e841c86 100644
--- a/drivers/char/watchdog/alim1535_wdt.c
+++ b/drivers/char/watchdog/alim1535_wdt.c
@@ -330,17 +330,20 @@ static int __init ali_find_watchdog(void)
330 u32 wdog; 330 u32 wdog;
331 331
332 /* Check for a 1535 series bridge */ 332 /* Check for a 1535 series bridge */
333 pdev = pci_find_device(PCI_VENDOR_ID_AL, 0x1535, NULL); 333 pdev = pci_get_device(PCI_VENDOR_ID_AL, 0x1535, NULL);
334 if(pdev == NULL) 334 if(pdev == NULL)
335 return -ENODEV; 335 return -ENODEV;
336 pci_dev_put(pdev);
336 337
337 /* Check for the a 7101 PMU */ 338 /* Check for the a 7101 PMU */
338 pdev = pci_find_device(PCI_VENDOR_ID_AL, 0x7101, NULL); 339 pdev = pci_get_device(PCI_VENDOR_ID_AL, 0x7101, NULL);
339 if(pdev == NULL) 340 if(pdev == NULL)
340 return -ENODEV; 341 return -ENODEV;
341 342
342 if(pci_enable_device(pdev)) 343 if(pci_enable_device(pdev)) {
344 pci_dev_put(pdev);
343 return -EIO; 345 return -EIO;
346 }
344 347
345 ali_pci = pdev; 348 ali_pci = pdev;
346 349
@@ -447,6 +450,7 @@ static void __exit watchdog_exit(void)
447 /* Deregister */ 450 /* Deregister */
448 unregister_reboot_notifier(&ali_notifier); 451 unregister_reboot_notifier(&ali_notifier);
449 misc_deregister(&ali_miscdev); 452 misc_deregister(&ali_miscdev);
453 pci_dev_put(ali_pci);
450} 454}
451 455
452module_init(watchdog_init); 456module_init(watchdog_init);