diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c index c777a612d932..d4c5a736fdcb 100644 --- a/drivers/watchdog/watchdog_core.c +++ b/drivers/watchdog/watchdog_core.c @@ -162,7 +162,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) || watchdog_hw_running(wdd)) { + if (watchdog_hw_running(wdd)) { int ret; ret = wdd->ops->stop(wdd); diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c index 0122e8796879..7102dc96573e 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c @@ -192,7 +192,7 @@ static int watchdog_ping(struct watchdog_device *wdd) { struct watchdog_core_data *wd_data = wdd->wd_data; - if (!watchdog_active(wdd) && !watchdog_hw_running(wdd)) + if (!watchdog_hw_running(wdd)) return 0; set_bit(_WDOG_KEEPALIVE, &wd_data->status); @@ -268,6 +268,7 @@ static int watchdog_start(struct watchdog_device *wdd) trace_watchdog_start(wdd, err); if (err == 0) { set_bit(WDOG_ACTIVE, &wdd->status); + set_bit(WDOG_HW_RUNNING, &wdd->status); wd_data->last_keepalive = started_at; wd_data->last_hw_keepalive = started_at; watchdog_update_worker(wdd);