From 004853d6d1ac46e40cff19b5e92065fda2490104 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 30 Jan 2023 02:38:59 +0800 Subject: [PATCH] drivers/watchdog: Fix the wrong value of WATCHDOG_AUTOMONITOR_PING_INTERVAL if CONFIG_WATCHDOG_AUTOMONITOR_PING_INTERVAL equals 0, we should set WATCHDOG_AUTOMONITOR_PING_INTERVAL to CONFIG_WATCHDOG_AUTOMONITOR_TIMEOUT / 2, not 0 Signed-off-by: Xiang Xiao --- drivers/timers/watchdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/timers/watchdog.c b/drivers/timers/watchdog.c index cea342583a..648e0ffbf2 100644 --- a/drivers/timers/watchdog.c +++ b/drivers/timers/watchdog.c @@ -56,7 +56,7 @@ !defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_IDLE) # if CONFIG_WATCHDOG_AUTOMONITOR_PING_INTERVAL == 0 # define WATCHDOG_AUTOMONITOR_PING_INTERVAL \ - (CONFIG_WATCHDOG_AUTOMONITOR_PING_INTERVAL / 2) + (CONFIG_WATCHDOG_AUTOMONITOR_TIMEOUT / 2) # else # define WATCHDOG_AUTOMONITOR_PING_INTERVAL \ CONFIG_WATCHDOG_AUTOMONITOR_PING_INTERVAL