[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180210203623.17832-3-marcus.folkesson@gmail.com>
Date: Sat, 10 Feb 2018 21:36:22 +0100
From: Marcus Folkesson <marcus.folkesson@...il.com>
To: Wim Van Sebroeck <wim@...ana.be>,
Guenter Roeck <linux@...ck-us.net>
Cc: Marcus Folkesson <marcus.folkesson@...il.com>,
linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 3/4] 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@...il.com>
---
drivers/watchdog/gpio_wdt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/watchdog/gpio_wdt.c b/drivers/watchdog/gpio_wdt.c
index cb66c2f99ff1..d0e8203f7a60 100644
--- a/drivers/watchdog/gpio_wdt.c
+++ b/drivers/watchdog/gpio_wdt.c
@@ -156,9 +156,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 = &pdev->dev;
+ priv->wdd.timeout = SOFT_TIMEOUT_DEF;
- if (watchdog_init_timeout(&priv->wdd, 0, &pdev->dev) < 0)
- priv->wdd.timeout = SOFT_TIMEOUT_DEF;
+ watchdog_init_timeout(&priv->wdd, 0, &pdev->dev);
watchdog_stop_on_reboot(&priv->wdd);
--
2.15.1
Powered by blists - more mailing lists