diff options
author | Kevin Hilman <khilman@deeprootsystems.com> | 2010-03-10 12:16:30 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-03-11 18:55:43 -0500 |
commit | 54c44fb7df4774280a2deb4ba191cbab84602413 (patch) | |
tree | 354e97afdd1778ec21781971bf1369119ddbd9ed /arch/arm/plat-omap | |
parent | 03d5671dde04a186471969d73cfc89ee02664c2c (diff) |
OMAP2: cpu_is_omap2*: fix compile-time removal of unused code
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>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r-- | arch/arm/plat-omap/include/plat/cpu.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index ed8786c41df2..75141742300c 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h | |||
@@ -167,10 +167,14 @@ IS_OMAP_SUBCLASS(443x, 0x443) | |||
167 | #if defined(MULTI_OMAP2) | 167 | #if defined(MULTI_OMAP2) |
168 | # if defined(CONFIG_ARCH_OMAP2) | 168 | # if defined(CONFIG_ARCH_OMAP2) |
169 | # undef cpu_is_omap24xx | 169 | # undef cpu_is_omap24xx |
170 | # undef cpu_is_omap242x | ||
171 | # undef cpu_is_omap243x | ||
172 | # define cpu_is_omap24xx() is_omap24xx() | 170 | # define cpu_is_omap24xx() is_omap24xx() |
171 | # endif | ||
172 | # if defined (CONFIG_ARCH_OMAP2420) | ||
173 | # undef cpu_is_omap242x | ||
173 | # define cpu_is_omap242x() is_omap242x() | 174 | # define cpu_is_omap242x() is_omap242x() |
175 | # endif | ||
176 | # if defined (CONFIG_ARCH_OMAP2430) | ||
177 | # undef cpu_is_omap243x | ||
174 | # define cpu_is_omap243x() is_omap243x() | 178 | # define cpu_is_omap243x() is_omap243x() |
175 | # endif | 179 | # endif |
176 | # if defined(CONFIG_ARCH_OMAP3) | 180 | # if defined(CONFIG_ARCH_OMAP3) |