]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
watchdog: renesas_wdt: stop when unregistering
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 28 Aug 2018 10:13:48 +0000 (12:13 +0200)
committerKhalid Elmously <khalid.elmously@canonical.com>
Thu, 28 Nov 2019 04:59:27 +0000 (23:59 -0500)
BugLink: https://bugs.launchpad.net/bugs/1854216
[ 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@sang-engineering.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/watchdog/renesas_wdt.c

index c4a17d72d025062f228091e49e41ca7124d61875..05fb61f535b19501f8202396c37cb6567ee11f40 100644 (file)
@@ -181,6 +181,7 @@ static int rwdt_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, priv);
        watchdog_set_drvdata(&priv->wdev, priv);
        watchdog_set_nowayout(&priv->wdev, nowayout);
+       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);