]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
watchdog: cadence_wdt: fix timeout setting
authorTomas Melin <tomas.melin@vaisala.com>
Mon, 20 Mar 2017 07:29:31 +0000 (09:29 +0200)
committerWim Van Sebroeck <wim@iguana.be>
Thu, 18 May 2017 16:51:38 +0000 (18:51 +0200)
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>
drivers/watchdog/cadence_wdt.c

index 8d61e8bfe60b1a418eab489e966652840dedccff..86e0b5d2e7616690007792833e96cc9086ee0144 100644 (file)
@@ -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);