Skip to content

Commit

Permalink
[MIPS] time: Fix calculation in clockevent_set_clock()
Browse files Browse the repository at this point in the history
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Atsushi Nemoto authored and Ralf Baechle committed Oct 22, 2007
1 parent 55b70a0 commit 508a775
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/mips/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd,

/* Find a shift value */
for (shift = 32; shift > 0; shift--) {
temp = (u64) NSEC_PER_SEC << shift;
do_div(temp, clock);
temp = (u64) clock << shift;
do_div(temp, NSEC_PER_SEC);
if ((temp >> 32) == 0)
break;
}
Expand Down

0 comments on commit 508a775

Please sign in to comment.