aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/scx200_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/scx200_wdt.c')
-rw-r--r--drivers/watchdog/scx200_wdt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/watchdog/scx200_wdt.c b/drivers/watchdog/scx200_wdt.c
index d4fd0fa2f176..d55882bca319 100644
--- a/drivers/watchdog/scx200_wdt.c
+++ b/drivers/watchdog/scx200_wdt.c
@@ -231,17 +231,17 @@ static int __init scx200_wdt_init(void)
231 231
232 sema_init(&open_semaphore, 1); 232 sema_init(&open_semaphore, 1);
233 233
234 r = misc_register(&scx200_wdt_miscdev); 234 r = register_reboot_notifier(&scx200_wdt_notifier);
235 if (r) { 235 if (r) {
236 printk(KERN_ERR NAME ": unable to register reboot notifier");
236 release_region(scx200_cb_base + SCx200_WDT_OFFSET, 237 release_region(scx200_cb_base + SCx200_WDT_OFFSET,
237 SCx200_WDT_SIZE); 238 SCx200_WDT_SIZE);
238 return r; 239 return r;
239 } 240 }
240 241
241 r = register_reboot_notifier(&scx200_wdt_notifier); 242 r = misc_register(&scx200_wdt_miscdev);
242 if (r) { 243 if (r) {
243 printk(KERN_ERR NAME ": unable to register reboot notifier"); 244 unregister_reboot_notifier(&scx200_wdt_notifier);
244 misc_deregister(&scx200_wdt_miscdev);
245 release_region(scx200_cb_base + SCx200_WDT_OFFSET, 245 release_region(scx200_cb_base + SCx200_WDT_OFFSET,
246 SCx200_WDT_SIZE); 246 SCx200_WDT_SIZE);
247 return r; 247 return r;
@@ -252,8 +252,8 @@ static int __init scx200_wdt_init(void)
252 252
253static void __exit scx200_wdt_cleanup(void) 253static void __exit scx200_wdt_cleanup(void)
254{ 254{
255 unregister_reboot_notifier(&scx200_wdt_notifier);
256 misc_deregister(&scx200_wdt_miscdev); 255 misc_deregister(&scx200_wdt_miscdev);
256 unregister_reboot_notifier(&scx200_wdt_notifier);
257 release_region(scx200_cb_base + SCx200_WDT_OFFSET, 257 release_region(scx200_cb_base + SCx200_WDT_OFFSET,
258 SCx200_WDT_SIZE); 258 SCx200_WDT_SIZE);
259} 259}