patch-2.4.0-test9 linux/drivers/char/softdog.c
Next file: linux/drivers/char/toshiba.c
Previous file: linux/drivers/char/sh-sci.h
Back to the patch index
Back to the overall index
- Lines: 50
- Date:
Sun Oct 1 19:45:29 2000
- Orig file:
v2.4.0-test8/linux/drivers/char/softdog.c
- Orig date:
Wed Jul 12 21:58:42 2000
diff -u --recursive --new-file v2.4.0-test8/linux/drivers/char/softdog.c linux/drivers/char/softdog.c
@@ -53,7 +53,11 @@
* Our timer
*/
-struct timer_list watchdog_ticktock;
+static void watchdog_fire(unsigned long);
+
+static struct timer_list watchdog_ticktock = {
+ function: watchdog_fire,
+};
static int timer_alive = 0;
@@ -164,23 +168,24 @@
&softdog_fops
};
-void __init watchdog_init(void)
+static int __init watchdog_init(void)
{
- misc_register(&softdog_miscdev);
- init_timer(&watchdog_ticktock);
- watchdog_ticktock.function=watchdog_fire;
+ int ret;
+
+ ret = misc_register(&softdog_miscdev);
+
+ if (ret)
+ return ret;
+
printk("Software Watchdog Timer: 0.05, timer margin: %d sec\n", soft_margin);
-}
-#ifdef MODULE
-int init_module(void)
-{
- watchdog_init();
return 0;
-}
+}
-void cleanup_module(void)
+static void __exit watchdog_exit(void)
{
misc_deregister(&softdog_miscdev);
}
-#endif
+
+module_init(watchdog_init);
+module_exit(watchdog_exit);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)