From: Tony Lindgren Date: Fri, 24 Feb 2012 00:41:53 +0000 (-0800) Subject: ARM: OMAP2+: Fix OMAP_HDQ_BASE build error X-Git-Tag: v3.4-rc1~73^2~7^2~4 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=e3a98fe11b296b833ac540fbc19f407c790fdc05;p=linux.git ARM: OMAP2+: Fix OMAP_HDQ_BASE build error If CONFIG_SOC_OMAP3430 is not set and CONFIG_HDQ_MASTER_OMAP is selected for w1 driver we get the following error: arch/arm/mach-omap2/devices.c:662:13: error: 'OMAP_HDQ_BASE' undeclared here (not in a function) Looks like OMAP_HDQ_BASE is valid for all omaps except 2420, so we can remove the ifdef and not register the device on 2420. Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 283d11eae693..3ffefe275ea0 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -654,9 +654,7 @@ void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data) /*-------------------------------------------------------------------------*/ #if defined(CONFIG_HDQ_MASTER_OMAP) || defined(CONFIG_HDQ_MASTER_OMAP_MODULE) -#if defined(CONFIG_SOC_OMAP2430) || defined(CONFIG_SOC_OMAP3430) #define OMAP_HDQ_BASE 0x480B2000 -#endif static struct resource omap_hdq_resources[] = { { .start = OMAP_HDQ_BASE, @@ -679,7 +677,10 @@ static struct platform_device omap_hdq_dev = { }; static inline void omap_hdq_init(void) { - (void) platform_device_register(&omap_hdq_dev); + if (cpu_is_omap2420()) + return; + + platform_device_register(&omap_hdq_dev); } #else static inline void omap_hdq_init(void) {}