mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
watchdog: at91sam9_wdt: fix secs_to_ticks
Fix the secs_to_ticks macro in case 0 is passed as an argument. Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
This commit is contained in:
parent
705b675db9
commit
1444797fc1
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user