Commit 976932e4 authored by Marcus Folkesson's avatar Marcus Folkesson Committed by Wim Van Sebroeck

watchdog: sama5d4: make use of timeout-secs provided in devicetree

watchdog_init_timeout() will allways pick timeout_param since it
defaults to a valid timeout.

Following best practice described in
Documentation/watchdog/watchdog-kernel-api.txt to make use of
the parameter logic.
Signed-off-by: default avatarMarcus Folkesson <marcus.folkesson@gmail.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 2b77f008
...@@ -33,7 +33,7 @@ struct sama5d4_wdt { ...@@ -33,7 +33,7 @@ struct sama5d4_wdt {
unsigned long last_ping; unsigned long last_ping;
}; };
static int wdt_timeout = WDT_DEFAULT_TIMEOUT; static int wdt_timeout;
static bool nowayout = WATCHDOG_NOWAYOUT; static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(wdt_timeout, int, 0); module_param(wdt_timeout, int, 0);
...@@ -212,7 +212,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev) ...@@ -212,7 +212,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
wdd = &wdt->wdd; wdd = &wdt->wdd;
wdd->timeout = wdt_timeout; wdd->timeout = WDT_DEFAULT_TIMEOUT;
wdd->info = &sama5d4_wdt_info; wdd->info = &sama5d4_wdt_info;
wdd->ops = &sama5d4_wdt_ops; wdd->ops = &sama5d4_wdt_ops;
wdd->min_timeout = MIN_WDT_TIMEOUT; wdd->min_timeout = MIN_WDT_TIMEOUT;
...@@ -273,7 +273,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev) ...@@ -273,7 +273,7 @@ static int sama5d4_wdt_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, wdt); platform_set_drvdata(pdev, wdt);
dev_info(&pdev->dev, "initialized (timeout = %d sec, nowayout = %d)\n", dev_info(&pdev->dev, "initialized (timeout = %d sec, nowayout = %d)\n",
wdt_timeout, nowayout); wdd->timeout, nowayout);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment