Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1444797f authored by Boris Brezillon's avatar Boris Brezillon Committed by Wim Van Sebroeck
Browse files

watchdog: at91sam9_wdt: fix secs_to_ticks



Fix the secs_to_ticks macro in case 0 is passed as an argument.

Signed-off-by: default avatarBoris BREZILLON <b.brezillon@overkiz.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 705b675d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@
#define ticks_to_hz_rounddown(t)	((((t) + 1) * HZ) >> 8)
#define ticks_to_hz_roundup(t)		(((((t) + 1) * HZ) + 255) >> 8)
#define ticks_to_secs(t)		(((t) + 1) >> 8)
#define secs_to_ticks(s)		(((s) << 8) - 1)
#define secs_to_ticks(s)		((s) ? (((s) << 8) - 1) : 0)

#define WDT_MR_RESET	0x3FFF2FFF