summaryrefslogtreecommitdiff
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorZhao Qiang <qiang.zhao@nxp.com>2021-01-14 16:26:51 +0800
committerWim Van Sebroeck <wim@linux-watchdog.org>2021-02-07 14:41:21 +0100
commitac288a7b1a98a11e3269573b1de05fb35b80e051 (patch)
tree3c08d8e7f5d76442bcece60c9451824959975b3d /drivers/watchdog
parentfbf376056d16010dcba84aa89c2ac320b443163d (diff)
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 <qiang.zhao@nxp.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20210114082651.17162-1-qiang.zhao@nxp.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/watchdog_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c
index 0e9a99559609..5df0a22e2cb4 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);