Skip to content

Commit

Permalink
watchdog: tegra: Stop watchdog first if restarting
Browse files Browse the repository at this point in the history
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: Andrew Chew <achew@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Andrew Chew authored and Wim Van Sebroeck committed Nov 23, 2015
1 parent 62ed853 commit 0879eee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/watchdog/tegra_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0879eee

Please sign in to comment.