watchdog: gpio: add support for nowayout option
PATCH 1/1 watchdog: gpio: add support for nowayout option
Add support for the nowayout option in the gpio watchdog driver.
Signed-off-by Mans Rullgard <[email protected]>
--- drivers/watchdog/gpio_wdt.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/watchdog/gpio_wdt.c +7 -0
@@ -17,6 +17,12 @@#include <linux/platform_device.h> #include <linux/watchdog.h> +static bool nowayout =WATCHDOG_NOWAYOUT ; +module_param (nowayout, bool,0 ); +MODULE_PARM_DESC (nowayout, + "Watchdog cannot be stopped once started (default=" + __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); +#define SOFT_TIMEOUT_MIN 1#define SOFT_TIMEOUT_DEF 60
@@ -155,6 +161,7 @@ static int gpio_wdt_probe(struct platform_device *pdev) priv->wdd.timeout =SOFT_TIMEOUT_DEF ;watchdog_init_timeout (&priv->wdd,0 , &pdev->dev); +watchdog_set_nowayout (&priv->wdd, nowayout);watchdog_stop_on_reboot (&priv->wdd);
Signature · 1 line
2.21.0
Quoted 3 lines · Mans Rullgard
Add support for the nowayout option in the gpio watchdog driver.
Signed-off-by Mans Rullgard <[email protected]>
Reviewed-by Guenter Roeck <[email protected]>
Quoted 30 lines
--- drivers/watchdog/gpio_wdt.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/watchdog/gpio_wdt.c +7
-0@@ -17,6 +17,12 @@#include <linux/platform_device.h> #include <linux/watchdog.h> +static bool nowayout =WATCHDOG_NOWAYOUT ; +module_param (nowayout, bool,0 ); +MODULE_PARM_DESC (nowayout, + "Watchdog cannot be stopped once started (default=" + __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); +#define SOFT_TIMEOUT_MIN 1#define SOFT_TIMEOUT_DEF 60@@ -155,6 +161,7 @@ static int gpio_wdt_probe(struct platform_device *pdev) priv->wdd.timeout =SOFT_TIMEOUT_DEF ;watchdog_init_timeout (&priv->wdd,0 , &pdev->dev); +watchdog_set_nowayout (&priv->wdd, nowayout);watchdog_stop_on_reboot (&priv->wdd);