From: Zhao Qiang Date: Thu, 14 Jan 2021 08:26:51 +0000 (+0800) Subject: watchdog: stop wdd when watchdog hw running in reboot_notifier X-Git-Tag: accepted/tizen/unified/20230118.172025~7820^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac288a7b1a98a11e3269573b1de05fb35b80e051;p=platform%2Fkernel%2Flinux-rpi.git watchdog: stop wdd when watchdog hw running in reboot_notifier In watchdog_reboot_notifier, wdd should be stopped when the device is in hw_running state Signed-off-by: Zhao Qiang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210114082651.17162-1-qiang.zhao@nxp.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c index 0e9a995..5df0a22e 100644 --- a/drivers/watchdog/watchdog_core.c +++ b/drivers/watchdog/watchdog_core.c @@ -158,7 +158,7 @@ static int watchdog_reboot_notifier(struct notifier_block *nb, wdd = container_of(nb, struct watchdog_device, reboot_nb); if (code == SYS_DOWN || code == SYS_HALT) { - if (watchdog_active(wdd)) { + if (watchdog_active(wdd) || watchdog_hw_running(wdd)) { int ret; ret = wdd->ops->stop(wdd);