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 <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-01-30 02:38:59 +08:00 committed by GUIDINGLI
parent 570c7587c7
commit 004853d6d1

View File

@ -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