Skip to contentSkip to conversation

OMAP2: CONFIG_TOUCHSCREEN_ADS7846 XOR CONFIG_MTD_NAND_OMAP2 breaks build

PATCH In review Matthias Scheer 2 participants 3 messages May 6, 2011 – Jun 1, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OMAP2: CONFIG_TOUCHSCREEN_ADS7846 XOR CONFIG_MTD_NAND_OMAP2 breaks build

#ifdef clauses in arch/arm/mach-omap2/common-board-devices.h header file broke kernel build when configured with CONFIG_TOUCHSCREEN_ADS7846 (XOR) CONFIG_MTD_NAND_OMAP2

quick and dirty fix by using #ifdef clauses in the code file, too

---
 arch/arm/mach-omap2/common-board-devices.c |    7 +++++++
 arch/arm/mach-omap2/common-board-devices.h |    3 +--
 2 files changed, 8 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-omap2/common-board-devices.c
index d57c71d..4f290e9 100644

arch/arm/mach-omap2/common-board-devices.c +3 -0
@@ -50,6 +50,9 @@ void __init omap_pmic_init(int bus, u32 clkrate,
 	omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
 }
 
+#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
+	defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
+
 static struct omap2_mcspi_device_config ads7846_mcspi_config = {
 	.turbo_mode	= 0,
 	.single_channel	= 1,	/* 0: slave, 1: master */
@@ -105,7 +108,9 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown,

int gpio_debounce,

spi_register_board_info(&ads7846_spi_board_info, 1);
}
+#endif

+#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
static struct omap_nand_platform_data nand_data = {
.dma_channel = -1, /* disable DMA in OMAP NAND driver */
};
@@ -146,3 +151,5 @@ void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
printk(KERN_ERR "Unable to register NAND device\n");
}
}
+#endif
+

(quoted diff) +0 -0

b/arch/arm/mach-omap2/common-board-devices.h
index ca03abf..eb4a07a 100644

arch/arm/mach-omap2/common-board-devices.h +1 -2
@@ -3,6 +3,7 @@
 
 struct twl4030_platform_data;
 struct mtd_partition;
+struct ads7846_platform_data;
 
 void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,
 		    struct twl4030_platform_data *pmic_data);
@@ -28,8 +29,6 @@ static inline void omap4_pmic_init(const char *pmic_type,
 
 #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
 	defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
-struct ads7846_platform_data;
-
 void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
 		       struct ads7846_platform_data *board_pdata);
 #else
Signature · 1 line
1.7.1
maintainer
#1 lore raw
Quoted 5 lines · Matthias Scheer

#ifdef clauses in arch/arm/mach-omap2/common-board-devices.h header file broke kernel build when configured with CONFIG_TOUCHSCREEN_ADS7846 (XOR) CONFIG_MTD_NAND_OMAP2

quick and dirty fix by using #ifdef clauses in the code file, too

Care to check if this is still needed for v3.0-rc1? If so, please add proper patch description and Signed-off-by.

Thanks,

Tony

#2 lore raw
Quoted 2 lines · Tony Lindgren

Care to check if this is still needed for v3.0-rc1? If so, please add proper patch description and Signed-off-by.

Just tried and successfully built stock 3.0-rc1 kernels with both configuration combinations. Patch no longer needed.

Cheers,
Matthias