aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/watchdog/i6300esb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/char/watchdog/i6300esb.c b/drivers/char/watchdog/i6300esb.c
index 87273839aead..20ceb5fe28b6 100644
--- a/drivers/char/watchdog/i6300esb.c
+++ b/drivers/char/watchdog/i6300esb.c
@@ -368,12 +368,11 @@ static unsigned char __init esb_getdevice (void)
368 * Find the PCI device 368 * Find the PCI device
369 */ 369 */
370 370
371 while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { 371 for_each_pci_dev(dev)
372 if (pci_match_device(esb_pci_tbl, dev)) { 372 if (pci_match_device(esb_pci_tbl, dev)) {
373 esb_pci = dev; 373 esb_pci = dev;
374 break; 374 break;
375 } 375 }
376 }
377 376
378 if (esb_pci) { 377 if (esb_pci) {
379 if (pci_enable_device(esb_pci)) { 378 if (pci_enable_device(esb_pci)) {
@@ -430,6 +429,7 @@ err_release:
430 pci_release_region(esb_pci, 0); 429 pci_release_region(esb_pci, 0);
431err_disable: 430err_disable:
432 pci_disable_device(esb_pci); 431 pci_disable_device(esb_pci);
432 pci_dev_put(esb_pci);
433 } 433 }
434out: 434out:
435 return 0; 435 return 0;
@@ -481,6 +481,7 @@ err_unmap:
481 pci_release_region(esb_pci, 0); 481 pci_release_region(esb_pci, 0);
482/* err_disable: */ 482/* err_disable: */
483 pci_disable_device(esb_pci); 483 pci_disable_device(esb_pci);
484 pci_dev_put(esb_pci);
484/* out: */ 485/* out: */
485 return ret; 486 return ret;
486} 487}
@@ -497,6 +498,7 @@ static void __exit watchdog_cleanup (void)
497 iounmap(BASEADDR); 498 iounmap(BASEADDR);
498 pci_release_region(esb_pci, 0); 499 pci_release_region(esb_pci, 0);
499 pci_disable_device(esb_pci); 500 pci_disable_device(esb_pci);
501 pci_dev_put(esb_pci);
500} 502}
501 503
502module_init(watchdog_init); 504module_init(watchdog_init);