diff options
author | Boris BREZILLON <b.brezillon@overkiz.com> | 2013-11-03 18:52:42 +0100 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2014-01-28 21:34:18 +0100 |
commit | 1444797fc178b58e91cf29a438efd05dd890d43a (patch) | |
tree | 3589e443cb8d76067e4d9c2fa9b65a375d463c82 /drivers/watchdog/at91sam9_wdt.c | |
parent | ARM: at91/dt: add watchdog properties to kizbox board (diff) | |
download | linux-1444797fc178b58e91cf29a438efd05dd890d43a.tar.xz linux-1444797fc178b58e91cf29a438efd05dd890d43a.zip |
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>
Diffstat (limited to 'drivers/watchdog/at91sam9_wdt.c')
-rw-r--r-- | drivers/watchdog/at91sam9_wdt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c index 9bd089ebb70f..65f469145950 100644 --- a/drivers/watchdog/at91sam9_wdt.c +++ b/drivers/watchdog/at91sam9_wdt.c @@ -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 |