From: Matthias Scheer <scheer@in.tum.de>
To: linux-omap@vger.kernel.org
Subject: [PATCH] OMAP2: CONFIG_TOUCHSCREEN_ADS7846 XOR CONFIG_MTD_NAND_OMAP2 breaks build
Date: Fri, 6 May 2011 19:12:56 +0000 (UTC) [thread overview]
Message-ID: <loom.20110506T210326-622@post.gmane.org> (raw)
#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(-)
diff --git a/arch/arm/mach-omap2/common-board-devices.c
b/arch/arm/mach-omap2/common-board-devices.c
index d57c71d..4f290e9 100644
--- a/arch/arm/mach-omap2/common-board-devices.c
+++ b/arch/arm/mach-omap2/common-board-devices.c
@@ -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
+
diff --git a/arch/arm/mach-omap2/common-board-devices.h
b/arch/arm/mach-omap2/common-board-devices.h
index ca03abf..eb4a07a 100644
--- a/arch/arm/mach-omap2/common-board-devices.h
+++ b/arch/arm/mach-omap2/common-board-devices.h
@@ -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
--
1.7.1
next reply other threads:[~2011-05-06 19:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-06 19:12 Matthias Scheer [this message]
2011-05-31 13:07 ` [PATCH] OMAP2: CONFIG_TOUCHSCREEN_ADS7846 XOR CONFIG_MTD_NAND_OMAP2 breaks build Tony Lindgren
2011-06-01 21:42 ` Matthias Scheer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20110506T210326-622@post.gmane.org \
--to=scheer@in.tum.de \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox