Skip to content

Commit 0879eee

Browse files
Andrew ChewWim Van Sebroeck
authored andcommitted
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: Andrew Chew <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 62ed853 commit 0879eee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/watchdog/tegra_wdt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,10 @@ static int tegra_wdt_set_timeout(struct watchdog_device *wdd,
140140
{
141141
wdd->timeout = timeout;
142142

143-
if (watchdog_active(wdd))
143+
if (watchdog_active(wdd)) {
144+
tegra_wdt_stop(wdd);
144145
return tegra_wdt_start(wdd);
146+
}
145147

146148
return 0;
147149
}

0 commit comments

Comments
 (0)