diff options
author | Marcus Folkesson <marcus.folkesson@gmail.com> | 2018-02-10 21:36:22 +0100 |
---|---|---|
committer | Wim Van Sebroeck <wim@linux-watchdog.org> | 2018-03-03 17:04:15 +0100 |
commit | 65adfa22f5fc3542fc6776275f08c52975b82217 (patch) | |
tree | f3aaf3c83417141ba1c593068772ab45ffe4800e | |
parent | watchdog: omap_wdt: change order for setting default timeout (diff) | |
download | linux-65adfa22f5fc3542fc6776275f08c52975b82217.tar.xz 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>
-rw-r--r-- | drivers/watchdog/gpio_wdt.c | 4 |
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); |