Commit 508a775a authored by Atsushi Nemoto's avatar Atsushi Nemoto Committed by Ralf Baechle

[MIPS] time: Fix calculation in clockevent_set_clock()

Signed-off-by: default avatarAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 55b70a03
...@@ -195,8 +195,8 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd, ...@@ -195,8 +195,8 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd,
/* Find a shift value */ /* Find a shift value */
for (shift = 32; shift > 0; shift--) { for (shift = 32; shift > 0; shift--) {
temp = (u64) NSEC_PER_SEC << shift; temp = (u64) clock << shift;
do_div(temp, clock); do_div(temp, NSEC_PER_SEC);
if ((temp >> 32) == 0) if ((temp >> 32) == 0)
break; break;
} }
......
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