Use watchdog_stop_on_unregister() to stop sp805 watchdog when unregistering it
v2 cover Use watchdog_stop_on_unregister() to stop sp805 watchdog when unregistering it
Use watchdog_stop_on_unregister() in probe instead of calling wdt_disable() from the remove function.
Eliav Farber (1):
watchdog: sp805: disable watchdog on remove
drivers/watchdog/sp805_wdt.c | 1 + 1 file changed, 1 insertion(+)
Signature · 1 line
2.32.0
PATCH v2 1/1 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.
--- drivers/watchdog/sp805_wdt.c | 1 + 1 file changed, 1 insertion(+)
drivers/watchdog/sp805_wdt.c +1 -0
@@ -273,6 +273,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.
Signature · 1 line
2.32.0
Re: [PATCH v2 1/1] watchdog: sp805: disable watchdog on remove
Quoted 5 lines · Eliav Farber
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 <[email protected]>
Note that sending an introduction is not necessary for individual patches.
Guenter
Quoted 16 lines
--- drivers/watchdog/sp805_wdt.c | 1 + 1 file changed, 1 insertion(+)drivers/watchdog/sp805_wdt.c +1
-0@@ -273,6 +273,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.