From patchwork Fri May 6 19:12:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Scheer X-Patchwork-Id: 763022 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p46JDEkf003512 for ; Fri, 6 May 2011 19:13:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755352Ab1EFTNN (ORCPT ); Fri, 6 May 2011 15:13:13 -0400 Received: from lo.gmane.org ([80.91.229.12]:51474 "EHLO lo.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755125Ab1EFTNM (ORCPT ); Fri, 6 May 2011 15:13:12 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QIQSc-0005tI-6K for linux-omap@vger.kernel.org; Fri, 06 May 2011 21:13:10 +0200 Received: from ppp-93-104-17-21.dynamic.mnet-online.de ([93.104.17.21]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 May 2011 21:13:10 +0200 Received: from scheer by ppp-93-104-17-21.dynamic.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 May 2011 21:13:10 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: linux-omap@vger.kernel.org From: Matthias Scheer Subject: [PATCH] OMAP2: =?utf-8?b?Q09ORklHX1RPVUNIU0NSRUVOX0FEUzc4NDY=?= XOR =?utf-8?b?Q09ORklHX01URF9OQU5EX09NQVAy?= breaks build Date: Fri, 6 May 2011 19:12:56 +0000 (UTC) Lines: 70 Message-ID: Mime-Version: 1.0 X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 93.104.17.21 (Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.17) Gecko/20110422 Ubuntu/10.10 (maverick) Firefox/3.6.17) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 06 May 2011 19:13:15 +0000 (UTC) #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