浏览代码

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>
Andrew Chew 9 年之前
父节点
当前提交
0879eee13f
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      drivers/watchdog/tegra_wdt.c

+ 3 - 1
drivers/watchdog/tegra_wdt.c

@@ -140,8 +140,10 @@ static int tegra_wdt_set_timeout(struct watchdog_device *wdd,
 {
 {
 	wdd->timeout = timeout;
 	wdd->timeout = timeout;
 
 
-	if (watchdog_active(wdd))
+	if (watchdog_active(wdd)) {
+		tegra_wdt_stop(wdd);
 		return tegra_wdt_start(wdd);
 		return tegra_wdt_start(wdd);
+	}
 
 
 	return 0;
 	return 0;
 }
 }