summaryrefslogtreecommitdiff
path: root/drivers/watchdog/Kconfig
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2019-05-08 03:43:03 +0300
committerWim Van Sebroeck <wim@linux-watchdog.org>2019-05-08 11:33:59 +0300
commita9f0bda567e32a2b44165b067adfc4a4f56d1815 (patch)
treeca443725b2e580f2ea8b9acae6845c3f880f40d6 /drivers/watchdog/Kconfig
parente9974166a53acc0f6585fe3462d6ac45e204f785 (diff)
downloadlinux-a9f0bda567e32a2b44165b067adfc4a4f56d1815.tar.xz
watchdog: Enforce that at least one pretimeout governor is enabled
Since commit "watchdog: Use depends instead of select for pretimeout governors", it was possible to enable pretimeout governors but keep all of them disabled. Doing this results in the following build failure. ../drivers/watchdog/watchdog_pretimeout.c: In function ‘watchdog_register_governor’: ../drivers/watchdog/watchdog_pretimeout.c:139:26: error: ‘WATCHDOG_PRETIMEOUT_DEFAULT_GOV’ undeclared if (!strncmp(gov->name, WATCHDOG_PRETIMEOUT_DEFAULT_GOV, Since it does not make sense to enable pretimeout support but disable all pretimeout governors, enforce that at least one of them is always enabled. Fixes: f627ac0e12cd ("watchdog: Use depends instead of select for pretimeout governors") Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers/watchdog/Kconfig')
-rw-r--r--drivers/watchdog/Kconfig6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index f457992487ea..7ea60371bda0 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -71,6 +71,12 @@ config WATCHDOG_PRETIMEOUT_GOV
help
The option allows to select watchdog pretimeout governors.
+config WATCHDOG_PRETIMEOUT_GOV_SEL
+ tristate
+ depends on WATCHDOG_PRETIMEOUT_GOV
+ default m
+ select WATCHDOG_PRETIMEOUT_GOV_PANIC if WATCHDOG_PRETIMEOUT_GOV_NOOP=n
+
if WATCHDOG_PRETIMEOUT_GOV
config WATCHDOG_PRETIMEOUT_GOV_NOOP