[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191122100915.866371312@linuxfoundation.org>
Date: Fri, 22 Nov 2019 11:26:56 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Fabrizio Castro <fabrizio.castro@...renesas.com>,
Guenter Roeck <linux@...ck-us.net>,
Wim Van Sebroeck <wim@...ux-watchdog.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 4.19 051/220] watchdog: renesas_wdt: stop when unregistering
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
[ Upstream commit 14de99b44b34dbb9d0f64845b1cbb675e047767e ]
We want to go into a sane state when unregistering. Currently, it
happens that the watchdog stops when unbinding because of RuntimePM
stopping the core clock. When rebinding, the core clock gets reactivated
and the watchdog fires even though it hasn't been opened by userspace
yet. Strange scenario, yes, but sane state is much preferred anyhow.
Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro@...renesas.com>
Reviewed-by: Guenter Roeck <linux@...ck-us.net>
Signed-off-by: Guenter Roeck <linux@...ck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@...ux-watchdog.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/watchdog/renesas_wdt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/watchdog/renesas_wdt.c b/drivers/watchdog/renesas_wdt.c
index d01efd342dc0c..62d9d3edcdf25 100644
--- a/drivers/watchdog/renesas_wdt.c
+++ b/drivers/watchdog/renesas_wdt.c
@@ -239,6 +239,7 @@ static int rwdt_probe(struct platform_device *pdev)
watchdog_set_drvdata(&priv->wdev, priv);
watchdog_set_nowayout(&priv->wdev, nowayout);
watchdog_set_restart_priority(&priv->wdev, 0);
+ watchdog_stop_on_unregister(&priv->wdev);
/* This overrides the default timeout only if DT configuration was found */
ret = watchdog_init_timeout(&priv->wdev, 0, &pdev->dev);
--
2.20.1
Powered by blists - more mailing lists