linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Chew <achew@nvidia.com>
To: linux-watchdog@vger.kernel.org
Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
	abrestic@chromium.org, treding@nvidia.com, swarren@nvidia.com,
	jimmzhang@nvidia.com, linux@roeck-us.net, wim@iguana.be,
	Andrew Chew <achew@nvidia.com>
Subject: [PATCH] watchdog: tegra: Stop watchdog first if restarting
Date: Mon, 9 Nov 2015 16:11:38 -0800	[thread overview]
Message-ID: <1447114298-5516-1-git-send-email-achew@nvidia.com> (raw)

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

             reply	other threads:[~2015-11-10  0:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10  0:11 Andrew Chew [this message]
     [not found] ` <1447114298-5516-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-11-13 19:52   ` [PATCH] watchdog: tegra: Stop watchdog first if restarting Guenter Roeck
     [not found]     ` <56463F7E.8040008-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2015-11-16 10:48       ` Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447114298-5516-1-git-send-email-achew@nvidia.com \
    --to=achew@nvidia.com \
    --cc=abrestic@chromium.org \
    --cc=jimmzhang@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=swarren@nvidia.com \
    --cc=treding@nvidia.com \
    --cc=wim@iguana.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).