diff options
Diffstat (limited to 'drivers/watchdog/sbc60xxwdt.c')
-rw-r--r-- | drivers/watchdog/sbc60xxwdt.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/watchdog/sbc60xxwdt.c b/drivers/watchdog/sbc60xxwdt.c index e4f3cb6090bc..ef76f01625e7 100644 --- a/drivers/watchdog/sbc60xxwdt.c +++ b/drivers/watchdog/sbc60xxwdt.c | |||
@@ -359,20 +359,20 @@ static int __init sbc60xxwdt_init(void) | |||
359 | } | 359 | } |
360 | } | 360 | } |
361 | 361 | ||
362 | rc = misc_register(&wdt_miscdev); | 362 | rc = register_reboot_notifier(&wdt_notifier); |
363 | if (rc) | 363 | if (rc) |
364 | { | 364 | { |
365 | printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", | 365 | printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", |
366 | wdt_miscdev.minor, rc); | 366 | rc); |
367 | goto err_out_region2; | 367 | goto err_out_region2; |
368 | } | 368 | } |
369 | 369 | ||
370 | rc = register_reboot_notifier(&wdt_notifier); | 370 | rc = misc_register(&wdt_miscdev); |
371 | if (rc) | 371 | if (rc) |
372 | { | 372 | { |
373 | printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n", | 373 | printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n", |
374 | rc); | 374 | wdt_miscdev.minor, rc); |
375 | goto err_out_miscdev; | 375 | goto err_out_reboot; |
376 | } | 376 | } |
377 | 377 | ||
378 | printk(KERN_INFO PFX "WDT driver for 60XX single board computer initialised. timeout=%d sec (nowayout=%d)\n", | 378 | printk(KERN_INFO PFX "WDT driver for 60XX single board computer initialised. timeout=%d sec (nowayout=%d)\n", |
@@ -380,8 +380,8 @@ static int __init sbc60xxwdt_init(void) | |||
380 | 380 | ||
381 | return 0; | 381 | return 0; |
382 | 382 | ||
383 | err_out_miscdev: | 383 | err_out_reboot: |
384 | misc_deregister(&wdt_miscdev); | 384 | unregister_reboot_notifier(&wdt_notifier); |
385 | err_out_region2: | 385 | err_out_region2: |
386 | if ((wdt_stop != 0x45) && (wdt_stop != wdt_start)) | 386 | if ((wdt_stop != 0x45) && (wdt_stop != wdt_start)) |
387 | release_region(wdt_stop,1); | 387 | release_region(wdt_stop,1); |