Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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>

authored by

Andrew Chew and committed by
Wim Van Sebroeck
0879eee1 62ed853c

+3 -1
+3 -1
drivers/watchdog/tegra_wdt.c
··· 140 140 { 141 141 wdd->timeout = timeout; 142 142 143 - if (watchdog_active(wdd)) 143 + if (watchdog_active(wdd)) { 144 + tegra_wdt_stop(wdd); 144 145 return tegra_wdt_start(wdd); 146 + } 145 147 146 148 return 0; 147 149 }