From: Linus Walleij Date: Sun, 9 Aug 2009 22:04:35 +0000 (+0200) Subject: [WATCHDOG] Use DIV_ROUND_UP() macro in the coh901327 WDT X-Git-Tag: MMI-PSA29.97-13-9~26911^2~7 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0ecc3bf47b09de24c6b1163ba6558448aadd31ce;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [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: Linus Walleij Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c index aec7cefdef21..381026c0bd7b 100644 --- a/drivers/watchdog/coh901327_wdt.c +++ b/drivers/watchdog/coh901327_wdt.c @@ -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 */