aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2010-02-08 21:25:46 +0000
committerImre Kaloz <kaloz@openwrt.org>2010-02-08 21:25:46 +0000
commitd25a7e74ce9ae2022ee3157d3ffc558ae9e32ba1 (patch)
treeeb1aa2537441dfe72c2f70d5590e078553c2d5e3 /target
parent9fccc8819d9a1787ac9490a2ef3d3dbe625e453d (diff)
downloadupstream-d25a7e74ce9ae2022ee3157d3ffc558ae9e32ba1.tar.gz
upstream-d25a7e74ce9ae2022ee3157d3ffc558ae9e32ba1.tar.bz2
upstream-d25a7e74ce9ae2022ee3157d3ffc558ae9e32ba1.zip
[arm]: add a backported fix for the uncompression code
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19555 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic-2.6/patches-2.6.32/057-arm_fix_uncompress_code.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.32/057-arm_fix_uncompress_code.patch b/target/linux/generic-2.6/patches-2.6.32/057-arm_fix_uncompress_code.patch
new file mode 100644
index 0000000000..d11d11ba05
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.32/057-arm_fix_uncompress_code.patch
@@ -0,0 +1,63 @@
+From b53e9b5ebd5c6e718f54bcacd4e97b71533ca681 Mon Sep 17 00:00:00 2001
+From: Tony Lindgren <tony@atomide.com>
+Date: Thu, 14 Jan 2010 20:36:55 +0100
+Subject: [PATCH] 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>
+---
+ arch/arm/boot/compressed/misc.c | 1 -
+ arch/arm/mach-gemini/include/mach/uncompress.h | 4 +++-
+ arch/arm/plat-mxc/include/mach/uncompress.h | 4 +++-
+ 3 files changed, 6 insertions(+), 3 deletions(-)
+
+--- a/arch/arm/boot/compressed/misc.c
++++ b/arch/arm/boot/compressed/misc.c
+@@ -88,7 +88,6 @@ static void icedcc_putc(int ch)
+ #endif
+
+ #define putc(ch) icedcc_putc(ch)
+-#define flush() do { } while (0)
+ #endif
+
+ static void putstr(const char *ptr)
+--- 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)
+ UART[UART_TX] = c;
+ }
+
+-#define flush() do { } while (0)
++static inline void flush(void)
++{
++}
+
+ /*
+ * nothing to do
+--- 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)
+ UART(TXR) = ch;
+ }
+
+-#define flush() do { } while (0)
++static inline void flush(void)
++{
++}
+
+ #define MX1_UART1_BASE_ADDR 0x00206000
+ #define MX25_UART1_BASE_ADDR 0x43f90000