diff mbox

clocksource: sh_cmt: Rate calculation fix

Message ID 20100802092405.30680.9349.sendpatchset@t400s (mailing list archive)
State Accepted
Commit 38409d726bc6413d39f082f60bc803f52d8b5849
Headers show

Commit Message

Magnus Damm Aug. 2, 2010, 9:24 a.m. UTC
None
diff mbox

Patch

--- 0001/drivers/clocksource/sh_cmt.c
+++ work/drivers/clocksource/sh_cmt.c	2010-08-02 16:52:29.000000000 +0900
@@ -445,7 +445,7 @@  static int sh_cmt_register_clocksource(s
 
 	/* clk_get_rate() needs an enabled clock */
 	clk_enable(p->clk);
-	p->rate = clk_get_rate(p->clk) / (p->width == 16) ? 512 : 8;
+	p->rate = clk_get_rate(p->clk) / ((p->width == 16) ? 512 : 8);
 	clk_disable(p->clk);
 
 	/* TODO: calculate good shift from rate and counter bit width */