summaryrefslogtreecommitdiff
path: root/drivers/watchdog/uniphier_wdt.c
diff options
context:
space:
mode:
authorMarcus Folkesson <marcus.folkesson@gmail.com>2018-02-10 23:36:20 +0300
committerWim Van Sebroeck <wim@linux-watchdog.org>2018-03-03 19:04:15 +0300
commit63089396179fdc9e40a4e4a951744db3c0d48d7d (patch)
tree65da7ffab3ad4eb7b9f8cbde3e3ed03896a915ac /drivers/watchdog/uniphier_wdt.c
parent321390d9bdd9e0481bde19bd965d019855c1ec74 (diff)
downloadlinux-63089396179fdc9e40a4e4a951744db3c0d48d7d.tar.xz
watchdog: uniphier: 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> Acked-by: Keiji Hayashibara <hayashibara.keiji@socionext.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/uniphier_wdt.c')
-rw-r--r--drivers/watchdog/uniphier_wdt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/watchdog/uniphier_wdt.c b/drivers/watchdog/uniphier_wdt.c
index 0ea2339d9702..0e4f8d53ce3c 100644
--- a/drivers/watchdog/uniphier_wdt.c
+++ b/drivers/watchdog/uniphier_wdt.c
@@ -212,11 +212,10 @@ static int uniphier_wdt_probe(struct platform_device *pdev)
wdev->wdt_dev.ops = &uniphier_wdt_ops;
wdev->wdt_dev.max_timeout = WDT_PERIOD_MAX;
wdev->wdt_dev.min_timeout = WDT_PERIOD_MIN;
+ wdev->wdt_dev.timeout = WDT_DEFAULT_TIMEOUT;
wdev->wdt_dev.parent = dev;
- if (watchdog_init_timeout(&wdev->wdt_dev, timeout, dev) < 0) {
- wdev->wdt_dev.timeout = WDT_DEFAULT_TIMEOUT;
- }
+ watchdog_init_timeout(&wdev->wdt_dev, timeout, dev);
watchdog_set_nowayout(&wdev->wdt_dev, nowayout);
watchdog_stop_on_reboot(&wdev->wdt_dev);