]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/watchdog/eurotechwdt.c
[PATCH] rt2x00: Remove radio check from rt2x00lib_toggle_rx
[linux-2.6-omap-h63xx.git] / drivers / char / watchdog / eurotechwdt.c
index e228d6e173cead6243232be6a137c6f275776caa..b14e9d1f164da3a2d140af13343c93f10322b653 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *     Eurotech CPU-1220/1410 on board WDT driver
+ *     Eurotech CPU-1220/1410/1420 on board WDT driver
  *
  *     (c) Copyright 2001 Ascensit <support@ascensit.com>
  *     (c) Copyright 2001 Rodolfo Giometti <giometti@ascensit.com>
@@ -24,6 +24,9 @@
  */
 
 /* Changelog:
+ *
+ * 2001 - Rodolfo Giometti
+ *     Initial release
  *
  * 2002/04/25 - Rob Radez
  *     clean up #includes
  *     add WDIOC_GETSTATUS and WDIOC_SETOPTIONS ioctls
  *     add expect_close support
  *
- * 2001 - Rodolfo Giometti
- *     Initial release
- *
  * 2002.05.30 - Joel Becker <joel.becker@oracle.com>
  *     Added Matt Domsch's nowayout module option.
  */
 
+/*
+ *     The eurotech CPU-1220/1410/1420's watchdog is a part
+ *     of the on-board SUPER I/O device SMSC FDC 37B782.
+ */
+
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
@@ -73,7 +78,7 @@ static char *ev = "int";
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
 
 /*
  * Some symbolic names
@@ -413,17 +418,10 @@ static int __init eurwdt_init(void)
 {
        int ret;
 
-       ret = misc_register(&eurwdt_miscdev);
-       if (ret) {
-               printk(KERN_ERR "eurwdt: can't misc_register on minor=%d\n",
-               WATCHDOG_MINOR);
-               goto out;
-       }
-
        ret = request_irq(irq, eurwdt_interrupt, IRQF_DISABLED, "eurwdt", NULL);
        if(ret) {
                printk(KERN_ERR "eurwdt: IRQ %d is not free.\n", irq);
-               goto outmisc;
+               goto out;
        }
 
        if (!request_region(io, 2, "eurwdt")) {
@@ -438,6 +436,13 @@ static int __init eurwdt_init(void)
                goto outreg;
        }
 
+       ret = misc_register(&eurwdt_miscdev);
+       if (ret) {
+               printk(KERN_ERR "eurwdt: can't misc_register on minor=%d\n",
+               WATCHDOG_MINOR);
+               goto outreboot;
+       }
+
        eurwdt_unlock_chip();
 
        ret = 0;
@@ -448,14 +453,14 @@ static int __init eurwdt_init(void)
 out:
        return ret;
 
+outreboot:
+       unregister_reboot_notifier(&eurwdt_notifier);
+
 outreg:
        release_region(io, 2);
 
 outirq:
        free_irq(irq, NULL);
-
-outmisc:
-       misc_deregister(&eurwdt_miscdev);
        goto out;
 }