Commit ac288a7b authored by Zhao Qiang's avatar Zhao Qiang Committed by Wim Van Sebroeck

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: default avatarZhao Qiang <qiang.zhao@nxp.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210114082651.17162-1-qiang.zhao@nxp.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent fbf37605
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment