]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
OMAP2: cpu_is_omap2*: fix compile-time removal of unused code
authorKevin Hilman <khilman@deeprootsystems.com>
Wed, 10 Mar 2010 17:16:30 +0000 (17:16 +0000)
committerTony Lindgren <tony@atomide.com>
Thu, 11 Mar 2010 23:55:43 +0000 (15:55 -0800)
Currently if omap2420 is defined but not omap2430, cpu_is_omap2430()
is still defined as a macro, instead of #define'd to zero.  This
results in conditional cpu_is_omap2430() code still being compiled,
and leads to possible compile/link errors.  In particular for hwmod
init.

To fix, add extra #ifdefs to CPU check macros to ensure that the
is_omap* macros are zero for each OMAP2 if they are not configured
into the kernel.

Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/include/plat/cpu.h

index ed8786c41df2fd7543b59b6b8dd3a98e7d34d2d2..75141742300cfaca52494c0b767160d57ad617de 100644 (file)
@@ -167,10 +167,14 @@ IS_OMAP_SUBCLASS(443x, 0x443)
 #if defined(MULTI_OMAP2)
 # if defined(CONFIG_ARCH_OMAP2)
 #  undef  cpu_is_omap24xx
-#  undef  cpu_is_omap242x
-#  undef  cpu_is_omap243x
 #  define cpu_is_omap24xx()            is_omap24xx()
+# endif
+# if defined (CONFIG_ARCH_OMAP2420)
+#  undef  cpu_is_omap242x
 #  define cpu_is_omap242x()            is_omap242x()
+# endif
+# if defined (CONFIG_ARCH_OMAP2430)
+#  undef  cpu_is_omap243x
 #  define cpu_is_omap243x()            is_omap243x()
 # endif
 # if defined(CONFIG_ARCH_OMAP3)