* [PATCH] watchdog: cadence_wdt: fix timeout setting
@ 2017-03-20 7:29 Tomas Melin
2017-03-20 16:30 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Tomas Melin @ 2017-03-20 7:29 UTC (permalink / raw)
To: wim; +Cc: linux, linux-watchdog, Tomas Melin
wdt_timeout must not be initialized to CDNS_WDT_DEFAULT_TIMEOUT in
order to allow the value to be overriddden by a device tree setting.
This way, the default timeout value will be used only in case module_param
has not been set, or device tree timeout-sec has not been defined.
Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
---
drivers/watchdog/cadence_wdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/watchdog/cadence_wdt.c b/drivers/watchdog/cadence_wdt.c
index f0d199a..85960c0 100644
--- a/drivers/watchdog/cadence_wdt.c
+++ b/drivers/watchdog/cadence_wdt.c
@@ -50,7 +50,7 @@
/* Counter maximum value */
#define CDNS_WDT_COUNTER_MAX 0xFFF
-static int wdt_timeout = CDNS_WDT_DEFAULT_TIMEOUT;
+static int wdt_timeout;
static int nowayout = WATCHDOG_NOWAYOUT;
module_param(wdt_timeout, int, 0);
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] watchdog: cadence_wdt: fix timeout setting
2017-03-20 7:29 [PATCH] watchdog: cadence_wdt: fix timeout setting Tomas Melin
@ 2017-03-20 16:30 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2017-03-20 16:30 UTC (permalink / raw)
To: Tomas Melin; +Cc: wim, linux-watchdog
On Mon, Mar 20, 2017 at 09:29:31AM +0200, Tomas Melin wrote:
> wdt_timeout must not be initialized to CDNS_WDT_DEFAULT_TIMEOUT in
> order to allow the value to be overriddden by a device tree setting.
>
> This way, the default timeout value will be used only in case module_param
> has not been set, or device tree timeout-sec has not been defined.
>
> Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/cadence_wdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/cadence_wdt.c b/drivers/watchdog/cadence_wdt.c
> index f0d199a..85960c0 100644
> --- a/drivers/watchdog/cadence_wdt.c
> +++ b/drivers/watchdog/cadence_wdt.c
> @@ -50,7 +50,7 @@
> /* Counter maximum value */
> #define CDNS_WDT_COUNTER_MAX 0xFFF
>
> -static int wdt_timeout = CDNS_WDT_DEFAULT_TIMEOUT;
> +static int wdt_timeout;
> static int nowayout = WATCHDOG_NOWAYOUT;
>
> module_param(wdt_timeout, int, 0);
> --
> 2.1.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-20 17:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-20 7:29 [PATCH] watchdog: cadence_wdt: fix timeout setting Tomas Melin
2017-03-20 16:30 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).