Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752095AbbKJAK4 (ORCPT ); Mon, 9 Nov 2015 19:10:56 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:16673 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750850AbbKJAKz (ORCPT ); Mon, 9 Nov 2015 19:10:55 -0500 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Mon, 09 Nov 2015 16:00:01 -0800 From: Andrew Chew To: CC: , , , , , , , , Andrew Chew Subject: [PATCH] watchdog: tegra: Stop watchdog first if restarting Date: Mon, 9 Nov 2015 16:11:38 -0800 Message-ID: <1447114298-5516-1-git-send-email-achew@nvidia.com> X-Mailer: git-send-email 2.1.4 X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 988 Lines: 33 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 --- drivers/watchdog/tegra_wdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/