diff options
author | Tony Lindgren <tony@atomide.com> | 2010-01-14 14:36:55 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-01-18 07:44:51 -0500 |
commit | b53e9b5ebd5c6e718f54bcacd4e97b71533ca681 (patch) | |
tree | 055a09686eefa24a4bc72be7c25847c690f34c7d /arch/arm | |
parent | 95b8f20fd6a2694a16b8addb190b942bfb670c88 (diff) |
ARM: 5882/1: ARM: Fix uncompress code compile for different defines of flush(void)
Because of the include of the decompress_inflate.c file from
boot/compress/misc.c, there are different flush() defines:
In file included from arch/arm/boot/compressed/misc.c:249:
arch/arm/boot/compressed/../../../../lib/decompress_inflate.c:138:29: error: macro "flush" passed 2 arguments, but takes just 0
Fix this by removing the define of flush() in misc.c for
CONFIG_DEBUG_ICEDCC as it's already defined in mach/uncompress.h,
and that is being included unconditionally.
Also use a static inline function instead of define
for mach-mxc and mach-gemini to avoid similar bug
for those platforms.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/boot/compressed/misc.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-gemini/include/mach/uncompress.h | 4 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/uncompress.h | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 7e0fe4d42c7b..af6479fae931 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
@@ -88,7 +88,6 @@ static void icedcc_putc(int ch) | |||
88 | #endif | 88 | #endif |
89 | 89 | ||
90 | #define putc(ch) icedcc_putc(ch) | 90 | #define putc(ch) icedcc_putc(ch) |
91 | #define flush() do { } while (0) | ||
92 | #endif | 91 | #endif |
93 | 92 | ||
94 | static void putstr(const char *ptr) | 93 | static void putstr(const char *ptr) |
diff --git a/arch/arm/mach-gemini/include/mach/uncompress.h b/arch/arm/mach-gemini/include/mach/uncompress.h index 59c5df7e716c..5483f61a8061 100644 --- a/arch/arm/mach-gemini/include/mach/uncompress.h +++ b/arch/arm/mach-gemini/include/mach/uncompress.h | |||
@@ -30,7 +30,9 @@ static inline void putc(char c) | |||
30 | UART[UART_TX] = c; | 30 | UART[UART_TX] = c; |
31 | } | 31 | } |
32 | 32 | ||
33 | #define flush() do { } while (0) | 33 | static inline void flush(void) |
34 | { | ||
35 | } | ||
34 | 36 | ||
35 | /* | 37 | /* |
36 | * nothing to do | 38 | * nothing to do |
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h index 4d5d395ad63b..d49384cb1e97 100644 --- a/arch/arm/plat-mxc/include/mach/uncompress.h +++ b/arch/arm/plat-mxc/include/mach/uncompress.h | |||
@@ -60,7 +60,9 @@ static void putc(int ch) | |||
60 | UART(TXR) = ch; | 60 | UART(TXR) = ch; |
61 | } | 61 | } |
62 | 62 | ||
63 | #define flush() do { } while (0) | 63 | static inline void flush(void) |
64 | { | ||
65 | } | ||
64 | 66 | ||
65 | #define MX1_UART1_BASE_ADDR 0x00206000 | 67 | #define MX1_UART1_BASE_ADDR 0x00206000 |
66 | #define MX25_UART1_BASE_ADDR 0x43f90000 | 68 | #define MX25_UART1_BASE_ADDR 0x43f90000 |