static unsigned long wdt_is_open;
static int wdt_expect_close;
+#ifdef CONFIG_WATCHDOG_NOWAYOUT
+static int nowayout = 1;
+#else
+static int nowayout = 0;
+#endif
+
+MODULE_PARM(nowayout,"i");
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+
static spinlock_t wdt_spinlock;
/*
* Whack the dog
static void wdt_turnoff(void)
{
-#ifndef CONFIG_WATCHDOG_NOWAYOUT
- /* Stop the timer */
- del_timer(&timer);
- wdt_config(0);
- printk(OUR_NAME ": Watchdog timer is now disabled...\n");
-#endif
+ if (!nowayout) {
+ /* Stop the timer */
+ del_timer(&timer);
+ wdt_config(0);
+ printk(OUR_NAME ": Watchdog timer is now disabled...\n");
+ }
}
return -EBUSY;
/* Good, fire up the show */
wdt_startup();
-#ifdef CONFIG_WATCHDOG_NOWAYOUT
- MOD_INC_USE_COUNT;
-#endif
+ if (nowayout)
+ MOD_INC_USE_COUNT;
+
return 0;
default:
return -ENODEV;
{
static struct watchdog_info ident=
{
- 0,
- 1,
- "SC520"
+ .options = WDIOF_MAGICCLOSE,
+ .firmware_version = 1,
+ .identity = "SC520"
};
switch(cmd)