]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
watchdog: omap_wdt: change order for setting default timeout
authorMarcus Folkesson <marcus.folkesson@gmail.com>
Sat, 10 Feb 2018 20:36:21 +0000 (21:36 +0100)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sat, 3 Mar 2018 16:04:15 +0000 (17:04 +0100)
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>
drivers/watchdog/omap_wdt.c

index 1b02bfa81b2960059354c3e581b1118f359d2938..ae77112ce97f74e863edb3e1172632425c3ef970 100644 (file)
@@ -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);