Skip to content

Commit

Permalink
[WATCHDOG] Use DIV_ROUND_UP() macro in the coh901327 WDT
Browse files Browse the repository at this point in the history
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: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Linus Walleij authored and Wim Van Sebroeck committed Sep 18, 2009
1 parent 502a010 commit 0ecc3bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/coh901327_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static void coh901327_enable(u16 timeout)
* Wait 3 32 kHz cycles for it to take effect
*/
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 */
ndelay(delay_ns);
/* Enable the watchdog interrupt */
Expand Down

0 comments on commit 0ecc3bf

Please sign in to comment.