summaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog/alim1535_wdt.c
diff options
context:
space:
mode:
authorJiri Slaby2006-07-18 18:30:00 +0200
committerWim Van Sebroeck2006-10-02 22:55:51 +0200
commit02be2ee9e0797b6f657827e32345f0bfeae4c20e (patch)
tree0e04411b5337763b77c6ddf103cd9bc556d6c103 /drivers/char/watchdog/alim1535_wdt.c
parentMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/... (diff)
downloadkernel-qcow2-linux-02be2ee9e0797b6f657827e32345f0bfeae4c20e.tar.gz
kernel-qcow2-linux-02be2ee9e0797b6f657827e32345f0bfeae4c20e.tar.xz
kernel-qcow2-linux-02be2ee9e0797b6f657827e32345f0bfeae4c20e.zip
[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)
u32 wdog;
/* Check for a 1535 series bridge */
- pdev = pci_find_device(PCI_VENDOR_ID_AL, 0x1535, NULL);
+ pdev = pci_get_device(PCI_VENDOR_ID_AL, 0x1535, NULL);
if(pdev == NULL)
return -ENODEV;
+ pci_dev_put(pdev);
/* Check for the a 7101 PMU */
- pdev = pci_find_device(PCI_VENDOR_ID_AL, 0x7101, NULL);
+ pdev = pci_get_device(PCI_VENDOR_ID_AL, 0x7101, NULL);
if(pdev == NULL)
return -ENODEV;
- if(pci_enable_device(pdev))
+ if(pci_enable_device(pdev)) {
+ pci_dev_put(pdev);
return -EIO;
+ }
ali_pci = pdev;
@@ -447,6 +450,7 @@ static void __exit watchdog_exit(void)
/* Deregister */
unregister_reboot_notifier(&ali_notifier);
misc_deregister(&ali_miscdev);
+ pci_dev_put(ali_pci);
}
module_init(watchdog_init);