1 From e66a022a80d73b1a5d2e02c9db2c42e8b9853b40 Mon Sep 17 00:00:00 2001
2 From: Ben Hutchings <ben@decadent.org.uk>
3 Date: Sat, 11 Dec 2010 20:17:54 +0000
4 Subject: [PATCH] arm/ixp4xx: Rename FREQ macro to avoid collisions
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 FREQ is a ridiculously short name for a platform-specific macro in a
10 generic header, and it now conflicts with an enumeration in the
13 Also delete conditional reference to ixp4xx_get_board_tick_rate()
14 which is not defined anywhere.
16 Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17 Signed-off-by: Krzysztof HaĆasa <khc@pm.waw.pl>
19 arch/arm/mach-ixp4xx/common.c | 4 ++--
20 arch/arm/mach-ixp4xx/include/mach/timex.h | 5 +++--
21 drivers/input/misc/ixp4xx-beeper.c | 6 +-----
22 3 files changed, 6 insertions(+), 9 deletions(-)
24 --- a/arch/arm/mach-ixp4xx/common.c
25 +++ b/arch/arm/mach-ixp4xx/common.c
26 @@ -454,7 +454,7 @@ static struct clocksource clocksource_ix
27 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
30 -unsigned long ixp4xx_timer_freq = FREQ;
31 +unsigned long ixp4xx_timer_freq = IXP4XX_TIMER_FREQ;
32 EXPORT_SYMBOL(ixp4xx_timer_freq);
33 static void __init ixp4xx_clocksource_init(void)
35 @@ -530,7 +530,7 @@ static struct clock_event_device clockev
37 static void __init ixp4xx_clockevent_init(void)
39 - clockevent_ixp4xx.mult = div_sc(FREQ, NSEC_PER_SEC,
40 + clockevent_ixp4xx.mult = div_sc(IXP4XX_TIMER_FREQ, NSEC_PER_SEC,
41 clockevent_ixp4xx.shift);
42 clockevent_ixp4xx.max_delta_ns =
43 clockevent_delta2ns(0xfffffffe, &clockevent_ixp4xx);
44 --- a/arch/arm/mach-ixp4xx/include/mach/timex.h
45 +++ b/arch/arm/mach-ixp4xx/include/mach/timex.h
47 * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the
48 * timer register ignores the bottom 2 bits of the LATCH value.
50 -#define FREQ 66666000
51 -#define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
52 +#define IXP4XX_TIMER_FREQ 66666000
53 +#define CLOCK_TICK_RATE \
54 + (((IXP4XX_TIMER_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ)
56 --- a/drivers/input/misc/ixp4xx-beeper.c
57 +++ b/drivers/input/misc/ixp4xx-beeper.c
58 @@ -69,11 +69,7 @@ static int ixp4xx_spkr_event(struct inpu
61 if (value > 20 && value < 32767)
63 - count = (ixp4xx_get_board_tick_rate() / (value * 4)) - 1;
65 - count = (FREQ / (value * 4)) - 1;
67 + count = (IXP4XX_TIMER_FREQ / (value * 4)) - 1;
69 ixp4xx_spkr_control(pin, count);