mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
watchdog: omap: use watchdog_init_timeout instead of open coding it
Instead of (partly) open coding watchdog_init_timeout to determine the inital timeout use the core function that exists for exactly this purpose. As a side effect the "timeout-sec" device-tree property is recognized now (though currently unused in the omap device trees). Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
This commit is contained in:
parent
83efa1cbcf
commit
a4f741e3e1
2 changed files with 4 additions and 4 deletions
|
|
@ -234,10 +234,7 @@ static int omap_wdt_probe(struct platform_device *pdev)
|
|||
omap_wdt->min_timeout = TIMER_MARGIN_MIN;
|
||||
omap_wdt->max_timeout = TIMER_MARGIN_MAX;
|
||||
|
||||
if (timer_margin >= TIMER_MARGIN_MIN &&
|
||||
timer_margin <= TIMER_MARGIN_MAX)
|
||||
omap_wdt->timeout = timer_margin;
|
||||
else
|
||||
if (watchdog_init_timeout(omap_wdt, timer_margin, &pdev->dev) < 0)
|
||||
omap_wdt->timeout = TIMER_MARGIN_DEFAULT;
|
||||
|
||||
watchdog_set_drvdata(omap_wdt, wdev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue