Skip to contentSkip to conversation

watchdog: tangox: Set max_hw_heartbeat_ms instead of max_timeout

PATCH New Guenter Roeck 1 participant 1 message Jul 17, 2016 Watchdog device drivers

lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 1/1 watchdog: tangox: Set max_hw_heartbeat_ms instead of max_timeout

Setting max_hw_heartbeat_ms lets the watchdog core provide a virtual timeout if the timeout requested by user space is larger than the maximum hardware timeout. Also, it helps the watchdog core to provide heartbeats if the hardware watchdog is running while closed.

Fixes a3e376d26ace ("watchdog: tangox: Mark running watchdog correctly")
---
 drivers/watchdog/tangox_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/watchdog/tangox_wdt.c +1 -1
index e7a5d0fc81d4..202c4b9cc921 100644
@@ -149,7 +149,7 @@ static int tangox_wdt_probe(struct platform_device *pdev)
 	dev->wdt.ops = &tangox_wdt_ops;
 	dev->wdt.timeout = DEFAULT_TIMEOUT;
 	dev->wdt.min_timeout = 1;
-	dev->wdt.max_timeout = (U32_MAX - 1) / dev->clk_rate;
+	dev->wdt.max_hw_heartbeat_ms = (U32_MAX - 1) / dev->clk_rate;
 
 	watchdog_init_timeout(&dev->wdt, timeout, &pdev->dev);
 	watchdog_set_nowayout(&dev->wdt, nowayout);
Signature · 1 line
2.5.0