From: Guenter Roeck <linux@roeck-us.net>
To: Tomas Melin <tomas.melin@vaisala.com>
Cc: wim@iguana.be, linux-watchdog@vger.kernel.org
Subject: Re: [PATCH] watchdog: cadence_wdt: fix timeout setting
Date: Mon, 20 Mar 2017 09:30:28 -0700 [thread overview]
Message-ID: <20170320163028.GA7908@roeck-us.net> (raw)
In-Reply-To: <1489994971-56027-1-git-send-email-tomas.melin@vaisala.com>
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
prev parent reply other threads:[~2017-03-20 17:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-20 7:29 [PATCH] watchdog: cadence_wdt: fix timeout setting Tomas Melin
2017-03-20 16:30 ` Guenter Roeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170320163028.GA7908@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-watchdog@vger.kernel.org \
--cc=tomas.melin@vaisala.com \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.