提交 1444797f 编写于 作者: B Boris BREZILLON 提交者: Wim Van Sebroeck

watchdog: at91sam9_wdt: fix secs_to_ticks

Fix the secs_to_ticks macro in case 0 is passed as an argument.
Signed-off-by: NBoris BREZILLON <b.brezillon@overkiz.com>
Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
上级 705b675d
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册