From: Uwe Kleine-König Date: Tue, 9 Sep 2014 20:18:31 +0000 (+0200) Subject: watchdog: simplify definitions of WATCHDOG_NOWAYOUT(_INIT_STATUS)? X-Git-Tag: v5.15~16988^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4846e3784585173f48e267b76f968bcb4a12d3b2;p=platform%2Fkernel%2Flinux-starfive.git watchdog: simplify definitions of WATCHDOG_NOWAYOUT(_INIT_STATUS)? Signed-off-by: Uwe Kleine-K=C3=B6nig Reviewed-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h index 2a3038e..395b70e 100644 --- a/include/linux/watchdog.h +++ b/include/linux/watchdog.h @@ -97,13 +97,8 @@ struct watchdog_device { #define WDOG_UNREGISTERED 4 /* Has the device been unregistered */ }; -#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 +#define WATCHDOG_NOWAYOUT IS_BUILTIN(CONFIG_WATCHDOG_NOWAYOUT) +#define WATCHDOG_NOWAYOUT_INIT_STATUS (WATCHDOG_NOWAYOUT << WDOG_NO_WAY_OUT) /* Use the following function to check whether or not the watchdog is active */ static inline bool watchdog_active(struct watchdog_device *wdd)