mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-13 20:33:15 +00:00
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: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
This commit is contained in:
parent
03a196f25f
commit
d94fa4655e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user