diff options
author | Andrew Chew <achew@nvidia.com> | 2015-11-09 16:11:38 -0800 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2015-11-23 08:59:45 +0100 |
commit | 0879eee13f9cf79793ce88fb41bf0dd2a51093c0 (patch) | |
tree | b4e3232a1c29cea1ab673b74fcedfb3f25c4381f /drivers/watchdog/tegra_wdt.c | |
parent | 62ed853c7de7a77bdf01421fb6836269c9b1aa1f (diff) | |
download | op-kernel-dev-0879eee13f9cf79793ce88fb41bf0dd2a51093c0.zip op-kernel-dev-0879eee13f9cf79793ce88fb41bf0dd2a51093c0.tar.gz |
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>
Diffstat (limited to 'drivers/watchdog/tegra_wdt.c')
-rw-r--r-- | drivers/watchdog/tegra_wdt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/watchdog/tegra_wdt.c b/drivers/watchdog/tegra_wdt.c index 7f97cdd..9ec5760 100644 --- a/drivers/watchdog/tegra_wdt.c +++ b/drivers/watchdog/tegra_wdt.c @@ -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; } |