lkml.org 
[lkml]   [2015]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] watchdog: tegra: Stop watchdog first if restarting
From
Date
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 <achew@nvidia.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

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



\
 
 \ /
  Last update: 2015-11-13 21:21    [W:3.061 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site