summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/gpio_wdt.c
diff options
context:
space:
mode:
authorMarcus Folkesson2018-02-10 21:36:22 +0100
committerWim Van Sebroeck2018-03-03 17:04:15 +0100
commit65adfa22f5fc3542fc6776275f08c52975b82217 (patch)
treef3aaf3c83417141ba1c593068772ab45ffe4800e /drivers/watchdog/gpio_wdt.c
parentwatchdog: omap_wdt: change order for setting default timeout (diff)
downloadkernel-qcow2-linux-65adfa22f5fc3542fc6776275f08c52975b82217.tar.gz
kernel-qcow2-linux-65adfa22f5fc3542fc6776275f08c52975b82217.tar.xz
kernel-qcow2-linux-65adfa22f5fc3542fc6776275f08c52975b82217.zip
watchdog: gpio: change order for setting default timeout
watchdog_init_timeout() will preserve wdd->timeout value if no parameter nor timeout-secs dt property is set. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/gpio_wdt.c')
-rw-r--r--drivers/watchdog/gpio_wdt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/watchdog/gpio_wdt.c b/drivers/watchdog/gpio_wdt.c
index 3ade28190341..ea77cae03c9d 100644
--- a/drivers/watchdog/gpio_wdt.c
+++ b/drivers/watchdog/gpio_wdt.c
@@ -152,9 +152,9 @@ static int gpio_wdt_probe(struct platform_device *pdev)
priv->wdd.min_timeout = SOFT_TIMEOUT_MIN;
priv->wdd.max_hw_heartbeat_ms = hw_margin;
priv->wdd.parent = dev;
+ priv->wdd.timeout = SOFT_TIMEOUT_DEF;
- if (watchdog_init_timeout(&priv->wdd, 0, dev) < 0)
- priv->wdd.timeout = SOFT_TIMEOUT_DEF;
+ watchdog_init_timeout(&priv->wdd, 0, &pdev->dev);
watchdog_stop_on_reboot(&priv->wdd);