diff options
Diffstat (limited to 'drivers/char/watchdog/alim1535_wdt.c')
-rw-r--r-- | drivers/char/watchdog/alim1535_wdt.c | 10 |
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 | ||
452 | module_init(watchdog_init); | 456 | module_init(watchdog_init); |