From patchwork Thu Feb 12 14:10:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atal Shargorodsky X-Patchwork-Id: 6853 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n1CEB5ff031573 for ; Thu, 12 Feb 2009 14:11:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755270AbZBLOLD (ORCPT ); Thu, 12 Feb 2009 09:11:03 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755113AbZBLOLD (ORCPT ); Thu, 12 Feb 2009 09:11:03 -0500 Received: from smtp.nokia.com ([192.100.122.230]:62502 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755270AbZBLOLB (ORCPT ); Thu, 12 Feb 2009 09:11:01 -0500 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx03.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n1CEAQQA023929 for ; Thu, 12 Feb 2009 16:10:57 +0200 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 12 Feb 2009 16:10:56 +0200 Received: from mgw-int01.ntc.nokia.com ([172.21.143.96]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 12 Feb 2009 16:10:56 +0200 Received: from localhost.localdomain (esdhcp03954.research.nokia.com [172.21.39.54]) by mgw-int01.ntc.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id n1CEAts4015812; Thu, 12 Feb 2009 16:10:55 +0200 From: Atal Shargorodsky To: linux-omap@vger.kernel.org Cc: Atal Shargorodsky Subject: [PATCH 1/1] Allow I2C_OMAP to compile as a module. Date: Thu, 12 Feb 2009 16:10:29 +0200 Message-Id: X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <> References: <> X-OriginalArrivalTime: 12 Feb 2009 14:10:56.0405 (UTC) FILETIME=[B8FDE450:01C98D1B] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org This patch allows I2C_OMAP to be compiled as a module. Only drivers/i2c/busses/i2c-omap.c can be compiled as a module, but not arch/arm/plat-omap/i2c.c , so let the contents of i2c.c to compile into the kernel if either I2C_OMAP was selected to compile in or as a module. Signed-off-by: Atal Shargorodsky Acked-by: Jarkko Nikula --- arch/arm/plat-omap/Makefile | 3 +-- arch/arm/plat-omap/i2c.c | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile index b3f0e6b..3617bfe 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile @@ -4,7 +4,7 @@ # Common support obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \ - usb.o fb.o io.o + usb.o fb.o io.o i2c.o obj-m := obj-n := obj- := @@ -21,7 +21,6 @@ obj-$(CONFIG_OMAP_COMPONENT_VERSION) += component-version.o obj-$(CONFIG_OMAP_GPIO_SWITCH) += gpio-switch.o obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o -obj-$(CONFIG_I2C_OMAP) += i2c.o # OMAP mailbox framework obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index 467531e..a98a07f 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c @@ -35,6 +35,8 @@ #define OMAP2_I2C_BASE2 0x48072000 #define OMAP2_I2C_BASE3 0x48060000 +#if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) + static const char name[] = "i2c_omap"; #define I2C_RESOURCE_BUILDER(base, irq) \ @@ -163,3 +165,5 @@ int __init omap_register_i2c_bus(int bus_id, u32 clkrate, omap_i2c_mux_pins(bus_id - 1); return platform_device_register(pdev); } + +#endif