Commit d94fa465 authored by Wolfram Sang's avatar Wolfram Sang Committed by Wim Van Sebroeck

watchdog: asm9260_wdt: don't round closest with get_timeleft

We should never return more time left than there actually is. So, switch
to a plain divider instead of DIV_ROUND_CLOSEST.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 03a196f2
......@@ -82,7 +82,7 @@ static unsigned int asm9260_wdt_gettimeleft(struct watchdog_device *wdd)
counter = ioread32(priv->iobase + HW_WDTV);
return DIV_ROUND_CLOSEST(counter, priv->wdt_freq);
return counter / priv->wdt_freq;
}
static int asm9260_wdt_updatetimeout(struct watchdog_device *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