Commit 0ecc3bf4 authored by Linus Walleij's avatar Linus Walleij Committed by Wim Van Sebroeck

[WATCHDOG] Use DIV_ROUND_UP() macro in the coh901327 WDT

I saw Julia Lawalls various commits fixing up the use of rounding
macros and since my already submitted patch was not caught in this
I took it upon myself to fix it up for this driver as well.
Signed-off-by: default avatarLinus Walleij <linus.walleij@stericsson.com>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 502a0106
...@@ -110,7 +110,7 @@ static void coh901327_enable(u16 timeout) ...@@ -110,7 +110,7 @@ static void coh901327_enable(u16 timeout)
* Wait 3 32 kHz cycles for it to take effect * Wait 3 32 kHz cycles for it to take effect
*/ */
freq = clk_get_rate(clk); freq = clk_get_rate(clk);
delay_ns = (1000000000 + freq - 1) / freq; /* Freq to ns and round up */ delay_ns = DIV_ROUND_UP(1000000000, freq); /* Freq to ns and round up */
delay_ns = 3 * delay_ns; /* Wait 3 cycles */ delay_ns = 3 * delay_ns; /* Wait 3 cycles */
ndelay(delay_ns); ndelay(delay_ns);
/* Enable the watchdog interrupt */ /* Enable the watchdog interrupt */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment