summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/watchdog_pretimeout.h
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>2016-10-07 15:39:55 +0300
committerWim Van Sebroeck <wim@iguana.be>2016-10-08 10:27:13 +0200
commitf77710c4cda01ad9c3672fb2f97bdea9a94da92a (patch)
tree95d9c0f16b6270d486f6b3873363799d46a45795 /drivers/watchdog/watchdog_pretimeout.h
parentff84136cb6a4943f489ad037fe93f43be0573c23 (diff)
downloadlinux-f77710c4cda01ad9c3672fb2f97bdea9a94da92a.tar.bz2
watchdog: pretimeout: add noop pretimeout governor
The change adds noop watchdog pretimeout governor, only an informational message is printed to the kernel log buffer when a watchdog triggers a pretimeout event. While introducing the first pretimeout governor the selected design assumes that the default pretimeout governor is selected by its name and it is always built-in, thus the default pretimeout governor can not be unregistered and the correspondent check can be removed from the watchdog_unregister_governor() function. Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/watchdog_pretimeout.h')
-rw-r--r--drivers/watchdog/watchdog_pretimeout.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/watchdog/watchdog_pretimeout.h b/drivers/watchdog/watchdog_pretimeout.h
index c6cd9f80adb2..c4b6f88dc9c9 100644
--- a/drivers/watchdog/watchdog_pretimeout.h
+++ b/drivers/watchdog/watchdog_pretimeout.h
@@ -20,6 +20,10 @@ int watchdog_register_pretimeout(struct watchdog_device *wdd);
void watchdog_unregister_pretimeout(struct watchdog_device *wdd);
int watchdog_pretimeout_governor_get(struct watchdog_device *wdd, char *buf);
+#if IS_ENABLED(CONFIG_WATCHDOG_PRETIMEOUT_DEFAULT_GOV_NOOP)
+#define WATCHDOG_PRETIMEOUT_DEFAULT_GOV "noop"
+#endif
+
#else
static inline int watchdog_register_pretimeout(struct watchdog_device *wdd)
{