Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

watchdog: simplify definitions of WATCHDOG_NOWAYOUT(_INIT_STATUS)?

Signed-off-by: Uwe Kleine-K=C3=B6nig <u.kleine-koenig@pengutronix.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

authored by

Uwe Kleine-König and committed by
Wim Van Sebroeck
4846e378 0461aea7

+2 -7
+2 -7
include/linux/watchdog.h
··· 97 97 #define WDOG_UNREGISTERED 4 /* Has the device been unregistered */ 98 98 }; 99 99 100 - #ifdef CONFIG_WATCHDOG_NOWAYOUT 101 - #define WATCHDOG_NOWAYOUT 1 102 - #define WATCHDOG_NOWAYOUT_INIT_STATUS (1 << WDOG_NO_WAY_OUT) 103 - #else 104 - #define WATCHDOG_NOWAYOUT 0 105 - #define WATCHDOG_NOWAYOUT_INIT_STATUS 0 106 - #endif 100 + #define WATCHDOG_NOWAYOUT IS_BUILTIN(CONFIG_WATCHDOG_NOWAYOUT) 101 + #define WATCHDOG_NOWAYOUT_INIT_STATUS (WATCHDOG_NOWAYOUT << WDOG_NO_WAY_OUT) 107 102 108 103 /* Use the following function to check whether or not the watchdog is active */ 109 104 static inline bool watchdog_active(struct watchdog_device *wdd)