aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/watchdog/i6300esb.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/char/watchdog/i6300esb.c b/drivers/char/watchdog/i6300esb.c
index c04b246858ae..823924e4249b 100644
--- a/drivers/char/watchdog/i6300esb.c
+++ b/drivers/char/watchdog/i6300esb.c
@@ -69,11 +69,7 @@ static int heartbeat = WATCHDOG_HEARTBEAT; /* in seconds */
69module_param(heartbeat, int, 0); 69module_param(heartbeat, int, 0);
70MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (1<heartbeat<2046, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); 70MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (1<heartbeat<2046, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
71 71
72#ifdef CONFIG_WATCHDOG_NOWAYOUT 72static int nowayout = WATCHDOG_NOWAYOUT;
73static int nowayout = 1;
74#else
75static int nowayout = 0;
76#endif
77module_param(nowayout, int, 0); 73module_param(nowayout, int, 0);
78MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)"); 74MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
79 75
@@ -368,16 +364,17 @@ static unsigned char __init esb_getdevice (void)
368 * Find the PCI device 364 * Find the PCI device
369 */ 365 */
370 366
371 for_each_pci_dev(dev) 367 for_each_pci_dev(dev) {
372 if (pci_match_device(esb_pci_tbl, dev)) { 368 if (pci_match_device(esb_pci_tbl, dev)) {
373 esb_pci = dev; 369 esb_pci = dev;
374 break; 370 break;
375 } 371 }
372 }
376 373
377 if (esb_pci) { 374 if (esb_pci) {
378 if (pci_enable_device(esb_pci)) { 375 if (pci_enable_device(esb_pci)) {
379 printk (KERN_ERR PFX "failed to enable device\n"); 376 printk (KERN_ERR PFX "failed to enable device\n");
380 goto out; 377 goto err_devput;
381 } 378 }
382 379
383 if (pci_request_region(esb_pci, 0, ESB_MODULE_NAME)) { 380 if (pci_request_region(esb_pci, 0, ESB_MODULE_NAME)) {
@@ -429,9 +426,9 @@ err_release:
429 pci_release_region(esb_pci, 0); 426 pci_release_region(esb_pci, 0);
430err_disable: 427err_disable:
431 pci_disable_device(esb_pci); 428 pci_disable_device(esb_pci);
429err_devput:
432 pci_dev_put(esb_pci); 430 pci_dev_put(esb_pci);
433 } 431 }
434out:
435 return 0; 432 return 0;
436} 433}
437 434
@@ -481,8 +478,8 @@ err_unmap:
481 pci_release_region(esb_pci, 0); 478 pci_release_region(esb_pci, 0);
482/* err_disable: */ 479/* err_disable: */
483 pci_disable_device(esb_pci); 480 pci_disable_device(esb_pci);
481/* err_devput: */
484 pci_dev_put(esb_pci); 482 pci_dev_put(esb_pci);
485/* out: */
486 return ret; 483 return ret;
487} 484}
488 485