Message ID | 20210308112151.716315-3-f.suligoi@asem.it |
---|---|
State | New |
Headers | show |
Series | Watchdog Core Global Parameters | expand |
diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c index cec7917790e5..7304a335227f 100644 --- a/drivers/watchdog/wdat_wdt.c +++ b/drivers/watchdog/wdat_wdt.c @@ -437,6 +437,8 @@ static int wdat_wdt_probe(struct platform_device *pdev) } wdat_wdt_boot_status(wdat); + if (watchdog_global_param_start_enabled()) + wdat_wdt_start(&wdat->wdd); wdat_wdt_set_running(wdat); ret = wdat_wdt_enable_reboot(wdat);
The "start_enable" global parameter, managed in watchdog_core.c, forces the driver to start the watchdog countdown in the same moment of the module insertion. The driver also updates the watchdog status, setting the WDOG_HW_RUNNING flag, to enable the watchdog ping feature managed by the watchdog_core itself. Signed-off-by: Flavio Suligoi <f.suligoi@asem.it> --- drivers/watchdog/wdat_wdt.c | 2 ++ 1 file changed, 2 insertions(+)