[PATCH] (2.0) make softdog/hardware watchdog in same box work

Philipp Rumpf (prumpf@mandrakesoft.com)
Tue, 20 Feb 2001 11:18:33 -0600 (CST)


While misc_register() semantics are different in 2.0 from 2.[24], and the
2.[24] code would actually work in 2.0, the 2.0 code doesn't.

This fixes (I think) the case where you have softdog and a hardware
watchdog driver on the same box (and obviously want to use the hardware
watchdog).

diff -ur linux/drivers/char/misc.c linux-prumpf/drivers/char/misc.c
--- linux/drivers/char/misc.c Thu Jun 4 00:17:47 1998
+++ linux-prumpf/drivers/char/misc.c Tue Feb 20 18:05:46 2001
@@ -220,14 +220,17 @@
#ifdef CONFIG_SUN_MOUSE
sun_mouse_init();
#endif
-#ifdef CONFIG_SOFT_WATCHDOG
- watchdog_init();
-#endif
+ /* In 2.0, only the first misc_register() is significant for each
+ * minor. So we load the hardware watchdog drivers first, then the
+ * softdog driver. */
#ifdef CONFIG_WDT
wdt_init();
#endif
#ifdef CONFIG_PCWATCHDOG
pcwatchdog_init();
+#endif
+#ifdef CONFIG_SOFT_WATCHDOG
+ watchdog_init();
#endif
#ifdef CONFIG_APM
apm_bios_init();

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/