From: Eliav Farber Date: Thu, 14 Apr 2022 05:42:33 +0000 (+0000) Subject: watchdog: sp805: disable watchdog on remove X-Git-Tag: v6.1-rc5~1190^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac97c9374d3cdfa42611a32a653ac75db423cac4;p=platform%2Fkernel%2Flinux-starfive.git watchdog: sp805: disable watchdog on remove Disable the watchdog if it is active while removing the module. It is necessary in order to prevent a reset in case watchdog hw was running before the removal. Signed-off-by: Eliav Farber Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220414054233.1357-2-farbere@amazon.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c index dbeb214..f9479a3 100644 --- a/drivers/watchdog/sp805_wdt.c +++ b/drivers/watchdog/sp805_wdt.c @@ -272,6 +272,7 @@ sp805_wdt_probe(struct amba_device *adev, const struct amba_id *id) watchdog_set_nowayout(&wdt->wdd, nowayout); watchdog_set_drvdata(&wdt->wdd, wdt); watchdog_set_restart_priority(&wdt->wdd, 128); + watchdog_stop_on_unregister(&wdt->wdd); /* * If 'timeout-sec' devicetree property is specified, use that.