Skip to content

Commit

Permalink
watchdog: cadence_wdt: fix timeout setting
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Tomas Melin authored and Wim Van Sebroeck committed May 18, 2017
1 parent 46c319b commit 0ddad77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/cadence_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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);
Expand Down

0 comments on commit 0ddad77

Please sign in to comment.