From 58f166a466afea149fe9c1b35af630801f5effcc Mon Sep 17 00:00:00 2001 From: Eric Ruei Date: Thu, 22 Aug 2019 17:28:54 -0400 Subject: [PATCH] watchdog: keystone_wdt: fix extra delay after watchdog is closed This patch fixes the extra delay after the watchdog is closed by the user mode daemon. The problem is caused by the bug that max_hw_heartbeat_ms is set to MAX_HEARTBEAT instead of MAX_HEARTBEAT * 1000, which causes function watchdog_need-worker() at watchdog_dev.c to return true incorrectly. Signed-off-by: Eric Ruei --- drivers/watchdog/keystone_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/keystone_wdt.c b/drivers/watchdog/keystone_wdt.c index 747aeabcbb10e6..7be3324832e1f7 100644 --- a/drivers/watchdog/keystone_wdt.c +++ b/drivers/watchdog/keystone_wdt.c @@ -184,7 +184,7 @@ static int keystone_wdt_probe(struct platform_device *pdev) wdd->min_timeout = 1; /* Set min heartbeat to 1.1x window size */ wdd->min_hw_heartbeat_ms = 11 * DEFAULT_HEARTBEAT * 1000 / 20; - wdd->max_hw_heartbeat_ms = MAX_HEARTBEAT; + wdd->max_hw_heartbeat_ms = MAX_HEARTBEAT * 1000; wdd->timeout = DEFAULT_HEARTBEAT; wdd->parent = dev;