aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/wdt977.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/wdt977.c')
-rw-r--r--drivers/watchdog/wdt977.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/watchdog/wdt977.c b/drivers/watchdog/wdt977.c
index 9b7f6b6edef..fb4b876c9fd 100644
--- a/drivers/watchdog/wdt977.c
+++ b/drivers/watchdog/wdt977.c
@@ -470,20 +470,20 @@ static int __init wd977_init(void)
470 } 470 }
471 } 471 }
472 472
473 rc = misc_register(&wdt977_miscdev); 473 rc = register_reboot_notifier(&wdt977_notifier);
474 if (rc) 474 if (rc)
475 { 475 {
476 printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", 476 printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n",
477 wdt977_miscdev.minor, rc); 477 rc);
478 goto err_out_region; 478 goto err_out_region;
479 } 479 }
480 480
481 rc = register_reboot_notifier(&wdt977_notifier); 481 rc = misc_register(&wdt977_miscdev);
482 if (rc) 482 if (rc)
483 { 483 {
484 printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", 484 printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
485 rc); 485 wdt977_miscdev.minor, rc);
486 goto err_out_miscdev; 486 goto err_out_reboot;
487 } 487 }
488 488
489 printk(KERN_INFO PFX "initialized. timeout=%d sec (nowayout=%d, testmode=%i)\n", 489 printk(KERN_INFO PFX "initialized. timeout=%d sec (nowayout=%d, testmode=%i)\n",
@@ -491,8 +491,8 @@ static int __init wd977_init(void)
491 491
492 return 0; 492 return 0;
493 493
494err_out_miscdev: 494err_out_reboot:
495 misc_deregister(&wdt977_miscdev); 495 unregister_reboot_notifier(&wdt977_notifier);
496err_out_region: 496err_out_region:
497 if (!machine_is_netwinder()) 497 if (!machine_is_netwinder())
498 release_region(IO_INDEX_PORT,2); 498 release_region(IO_INDEX_PORT,2);