From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ettMd-0000if-1w for barebox@lists.infradead.org; Thu, 08 Mar 2018 11:05:36 +0000 From: Oleksij Rempel Date: Thu, 8 Mar 2018 12:05:13 +0100 Message-Id: <20180308110515.29574-4-o.rempel@pengutronix.de> In-Reply-To: <20180308110515.29574-1-o.rempel@pengutronix.de> References: <20180308110515.29574-1-o.rempel@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v1 4/6] watchdog: set some reasonable timeout_max value if no other is available To: barebox@lists.infradead.org Cc: Oleksij Rempel Some drivers do not provide timeout_max value. Using some value is probbaly better then setting timeout_max to 0. Signed-off-by: Oleksij Rempel --- drivers/watchdog/wd_core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/watchdog/wd_core.c b/drivers/watchdog/wd_core.c index 97e2ab568..66dbd790d 100644 --- a/drivers/watchdog/wd_core.c +++ b/drivers/watchdog/wd_core.c @@ -41,6 +41,10 @@ int watchdog_register(struct watchdog *wd) if (!wd->priority) wd->priority = WATCHDOG_DEFAULT_PRIORITY; + /* set some default sane value */ + if (!wd->timeout_max) + wd->timeout_max = 60 * 4; + dev_add_param_uint32_ro(&wd->dev, "timeout_max", &wd->timeout_max, "%u"); -- 2.16.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox