Skip to content

Commit

Permalink
watchdog: at91sam9_wdt: fix secs_to_ticks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Boris BREZILLON authored and Wim Van Sebroeck committed Jan 28, 2014
1 parent 705b675 commit 1444797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/at91sam9_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1444797

Please sign in to comment.