diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2017-07-17 20:12:24 +0300 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2017-09-09 21:25:34 +0300 |
commit | d94fa4655ed79784388cb49c17c5e9967ddfb4b9 (patch) | |
tree | 98c1a725ccb738ad45a6b4a2dd5c3b99e3b1929b /drivers/watchdog/asm9260_wdt.c | |
parent | 03a196f25f5652a3deffc1b8eade8a3c1c39282c (diff) | |
download | linux-d94fa4655ed79784388cb49c17c5e9967ddfb4b9.tar.xz |
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>
Diffstat (limited to 'drivers/watchdog/asm9260_wdt.c')
-rw-r--r-- | drivers/watchdog/asm9260_wdt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/asm9260_wdt.c b/drivers/watchdog/asm9260_wdt.c index 186fac4cccf5..7dd0da644a7f 100644 --- a/drivers/watchdog/asm9260_wdt.c +++ b/drivers/watchdog/asm9260_wdt.c @@ -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) |