Commit f6674213 authored by Tomer Maimon's avatar Tomer Maimon Committed by Wim Van Sebroeck
parent 982bb705
...@@ -103,30 +103,29 @@ static int npcm_wdt_stop(struct watchdog_device *wdd) ...@@ -103,30 +103,29 @@ static int npcm_wdt_stop(struct watchdog_device *wdd)
return 0; return 0;
} }
static int npcm_wdt_set_timeout(struct watchdog_device *wdd, static int npcm_wdt_set_timeout(struct watchdog_device *wdd,
unsigned int timeout) unsigned int timeout)
{ {
if (timeout < 2) if (timeout < 2)
wdd->timeout = 1; wdd->timeout = 1;
else if (timeout < 3) else if (timeout < 3)
wdd->timeout = 2; wdd->timeout = 2;
else if (timeout < 6) else if (timeout < 6)
wdd->timeout = 5; wdd->timeout = 5;
else if (timeout < 11) else if (timeout < 11)
wdd->timeout = 10; wdd->timeout = 10;
else if (timeout < 22) else if (timeout < 22)
wdd->timeout = 21; wdd->timeout = 21;
else if (timeout < 44) else if (timeout < 44)
wdd->timeout = 43; wdd->timeout = 43;
else if (timeout < 87) else if (timeout < 87)
wdd->timeout = 86; wdd->timeout = 86;
else if (timeout < 173) else if (timeout < 173)
wdd->timeout = 172; wdd->timeout = 172;
else if (timeout < 688) else if (timeout < 688)
wdd->timeout = 687; wdd->timeout = 687;
else else
wdd->timeout = 2750; wdd->timeout = 2750;
if (watchdog_active(wdd)) if (watchdog_active(wdd))
npcm_wdt_start(wdd); npcm_wdt_start(wdd);
......
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