summaryrefslogtreecommitdiff
path: root/drivers/watchdog/omap_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/omap_wdt.c')
-rw-r--r--drivers/watchdog/omap_wdt.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 1e6be9e40577..88ca2ea88695 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -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);