The nowayout-feature should ideally be per-device, but historically it is used globally or per-module. Add a define which makes emulating this behaviour easy when using the watchdog framework. For global usage, you can add .status = WATCHDOG_NOWAYOUT_INIT_STATUS, to the watchdog device. If you have a module parameter, you can add if (nowayout) wdd.status |= WATCHDOG_NOWAYOUT_INIT_STATUS; to the code. Signed-off-by: Wolfram Sang <w.sang@xxxxxxxxxxxxxx> --- include/linux/watchdog.h | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h index 111843f..4659bf8 100644 --- a/include/linux/watchdog.h +++ b/include/linux/watchdog.h @@ -53,12 +53,6 @@ struct watchdog_info { #ifdef __KERNEL__ -#ifdef CONFIG_WATCHDOG_NOWAYOUT -#define WATCHDOG_NOWAYOUT 1 -#else -#define WATCHDOG_NOWAYOUT 0 -#endif - struct watchdog_ops; struct watchdog_device; @@ -137,6 +131,14 @@ static inline void *watchdog_get_drvdata(struct watchdog_device *wdd) extern int watchdog_register_device(struct watchdog_device *); extern void watchdog_unregister_device(struct watchdog_device *); +#ifdef CONFIG_WATCHDOG_NOWAYOUT +#define WATCHDOG_NOWAYOUT 1 +#define WATCHDOG_NOWAYOUT_INIT_STATUS (1 << WDOG_NO_WAY_OUT) +#else +#define WATCHDOG_NOWAYOUT 0 +#define WATCHDOG_NOWAYOUT_INIT_STATUS 0 +#endif + #endif /* __KERNEL__ */ #endif /* ifndef _LINUX_WATCHDOG_H */ -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html