Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754865AbbKMTwf (ORCPT ); Fri, 13 Nov 2015 14:52:35 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:37001 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754225AbbKMTwd (ORCPT ); Fri, 13 Nov 2015 14:52:33 -0500 Subject: Re: [PATCH] watchdog: tegra: Stop watchdog first if restarting To: Andrew Chew , linux-watchdog@vger.kernel.org References: <1447114298-5516-1-git-send-email-achew@nvidia.com> Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, abrestic@chromium.org, treding@nvidia.com, swarren@nvidia.com, jimmzhang@nvidia.com, wim@iguana.be From: Guenter Roeck Message-ID: <56463F7E.8040008@roeck-us.net> Date: Fri, 13 Nov 2015 11:52:30 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1447114298-5516-1-git-send-email-achew@nvidia.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1288 Lines: 42 On 11/09/2015 04:11 PM, Andrew Chew wrote: > 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 Reviewed-by: Guenter Roeck Some feedback from the maintainers would be helpful, though, especially if there is some other means to change the timeout without stopping the watchdog. Guenter > --- > 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; > } > -- 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/