Commit 0879eee1 authored by Andrew Chew's avatar Andrew Chew Committed by Wim Van Sebroeck

watchdog: tegra: Stop watchdog first if restarting

If we need to restart the watchdog due to someone changing the timeout
interval, stop the watchdog before restarting it.  Otherwise, the new
timeout doesn't seem to take.
Signed-off-by: default avatarAndrew Chew <achew@nvidia.com>
Reviewed-by: default avatarThierry Reding <treding@nvidia.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 62ed853c
......@@ -140,8 +140,10 @@ static int tegra_wdt_set_timeout(struct watchdog_device *wdd,
{
wdd->timeout = timeout;
if (watchdog_active(wdd))
if (watchdog_active(wdd)) {
tegra_wdt_stop(wdd);
return tegra_wdt_start(wdd);
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment