Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wolfram Sang and committed by
Wim Van Sebroeck
d94fa465 03a196f2

+1 -1
+1 -1
drivers/watchdog/asm9260_wdt.c
··· 82 82 83 83 counter = ioread32(priv->iobase + HW_WDTV); 84 84 85 - return DIV_ROUND_CLOSEST(counter, priv->wdt_freq); 85 + return counter / priv->wdt_freq; 86 86 } 87 87 88 88 static int asm9260_wdt_updatetimeout(struct watchdog_device *wdd)