linux-mips
[Top] [All Lists]

[PATCH][2/2][MIPS] move clockevent_set_clock() before clockevent_delta2n

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH][2/2][MIPS] move clockevent_set_clock() before clockevent_delta2ns()
From: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Date: Tue, 23 Oct 2007 18:22:50 +0900
Cc: yoichi_yuasa@tripeaks.co.jp, linux-mips <linux-mips@linux-mips.org>
In-reply-to: <20071023181913.252daa3e.yoichi_yuasa@tripeaks.co.jp>
Organization: TriPeaks Corporation
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20071023181913.252daa3e.yoichi_yuasa@tripeaks.co.jp>
Sender: linux-mips-bounce@linux-mips.org
clockevent_delta2ns() use shift and mult value.
It should call clockevent_set_clock() first.
Pointed out by Atsushi Nemoto.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>

diff -pruN -X mips/Documentation/dontdiff 
mips-orig/arch/mips/kernel/cevt-gt641xx.c mips/arch/mips/kernel/cevt-gt641xx.c
--- mips-orig/arch/mips/kernel/cevt-gt641xx.c   2007-10-23 16:29:19.831141250 
+0900
+++ mips/arch/mips/kernel/cevt-gt641xx.c        2007-10-23 16:29:09.702508250 
+0900
@@ -131,9 +131,9 @@ static int __init gt641xx_timer0_clockev
 
        cd = &gt641xx_timer0_clockevent;
        cd->rating = 200 + gt641xx_base_clock / 10000000;
+       clockevent_set_clock(cd, gt641xx_base_clock);
        cd->max_delta_ns = clockevent_delta2ns(0x7fffffff, cd);
        cd->min_delta_ns = clockevent_delta2ns(0x300, cd);
-       clockevent_set_clock(cd, gt641xx_base_clock);
 
        clockevents_register_device(&gt641xx_timer0_clockevent);
 

<Prev in Thread] Current Thread [Next in Thread>