summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/omap_wdt.c
diff options
context:
space:
mode:
authorMarcus Folkesson <marcus.folkesson@gmail.com>2018-02-10 21:36:21 +0100
committerWim Van Sebroeck <wim@linux-watchdog.org>2018-03-03 17:04:15 +0100
commit1253730ef6142a095ca39a19fb5d300ca03a4439 (patch)
tree8d232f137b0cad78761ebc7af303375a317b0d80 /drivers/watchdog/omap_wdt.c
parentwatchdog: uniphier: change order for setting default timeout (diff)
downloadlinux-1253730ef6142a095ca39a19fb5d300ca03a4439.tar.xz
linux-1253730ef6142a095ca39a19fb5d300ca03a4439.zip
watchdog: omap_wdt: 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/omap_wdt.c')
-rw-r--r--drivers/watchdog/omap_wdt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 1b02bfa81b29..ae77112ce97f 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -253,10 +253,10 @@ static int omap_wdt_probe(struct platform_device *pdev)
wdev->wdog.ops = &omap_wdt_ops;
wdev->wdog.min_timeout = TIMER_MARGIN_MIN;
wdev->wdog.max_timeout = TIMER_MARGIN_MAX;
+ wdev->wdog.timeout = TIMER_MARGIN_DEFAULT;
wdev->wdog.parent = &pdev->dev;
- if (watchdog_init_timeout(&wdev->wdog, timer_margin, &pdev->dev) < 0)
- wdev->wdog.timeout = TIMER_MARGIN_DEFAULT;
+ watchdog_init_timeout(&wdev->wdog, timer_margin, &pdev->dev);
watchdog_set_nowayout(&wdev->wdog, nowayout);