package: kernel: add handling for 3.2 renames (and some missed ones for 3.1)
[openwrt.git] / target / linux / generic / patches-2.6.32 / 057-arm_fix_uncompress_code.patch
1 From b53e9b5ebd5c6e718f54bcacd4e97b71533ca681 Mon Sep 17 00:00:00 2001
2 From: Tony Lindgren <tony@atomide.com>
3 Date: Thu, 14 Jan 2010 20:36:55 +0100
4 Subject: [PATCH] ARM: 5882/1: ARM: Fix uncompress code compile for different defines of flush(void)
5
6 Because of the include of the decompress_inflate.c file from
7 boot/compress/misc.c, there are different flush() defines:
8
9 In file included from arch/arm/boot/compressed/misc.c:249:
10 arch/arm/boot/compressed/../../../../lib/decompress_inflate.c:138:29: error: macro "flush" passed 2 arguments, but takes just 0
11
12 Fix this by removing the define of flush() in misc.c for
13 CONFIG_DEBUG_ICEDCC as it's already defined in mach/uncompress.h,
14 and that is being included unconditionally.
15
16 Also use a static inline function instead of define
17 for mach-mxc and mach-gemini to avoid similar bug
18 for those platforms.
19
20 Signed-off-by: Tony Lindgren <tony@atomide.com>
21 Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
22 ---
23 arch/arm/boot/compressed/misc.c | 1 -
24 arch/arm/mach-gemini/include/mach/uncompress.h | 4 +++-
25 arch/arm/plat-mxc/include/mach/uncompress.h | 4 +++-
26 3 files changed, 6 insertions(+), 3 deletions(-)
27
28 --- a/arch/arm/boot/compressed/misc.c
29 +++ b/arch/arm/boot/compressed/misc.c
30 @@ -88,7 +88,6 @@ static void icedcc_putc(int ch)
31 #endif
32
33 #define putc(ch) icedcc_putc(ch)
34 -#define flush() do { } while (0)
35 #endif
36
37 static void putstr(const char *ptr)
38 --- a/arch/arm/mach-gemini/include/mach/uncompress.h
39 +++ b/arch/arm/mach-gemini/include/mach/uncompress.h
40 @@ -30,7 +30,9 @@ static inline void putc(char c)
41 UART[UART_TX] = c;
42 }
43
44 -#define flush() do { } while (0)
45 +static inline void flush(void)
46 +{
47 +}
48
49 /*
50 * nothing to do
51 --- a/arch/arm/plat-mxc/include/mach/uncompress.h
52 +++ b/arch/arm/plat-mxc/include/mach/uncompress.h
53 @@ -60,7 +60,9 @@ static void putc(int ch)
54 UART(TXR) = ch;
55 }
56
57 -#define flush() do { } while (0)
58 +static inline void flush(void)
59 +{
60 +}
61
62 #define MX1_UART1_BASE_ADDR 0x00206000
63 #define MX25_UART1_BASE_ADDR 0x43f90000
This page took 0.050559 seconds and 5 git commands to generate.