mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 06:04:14 +08:00
[MIPS] time: Fix calculation in clockevent_set_clock()
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
55b70a0300
commit
508a775a3c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user