From patchwork Thu Feb 12 12:54:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atal Shargorodsky X-Patchwork-Id: 6850 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 n1CCtd4J026759 for ; Thu, 12 Feb 2009 12:55:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751110AbZBLMzi (ORCPT ); Thu, 12 Feb 2009 07:55:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756933AbZBLMzi (ORCPT ); Thu, 12 Feb 2009 07:55:38 -0500 Received: from smtp.nokia.com ([192.100.105.134]:46790 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751110AbZBLMzh (ORCPT ); Thu, 12 Feb 2009 07:55:37 -0500 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx09.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n1CCtF9g002016 for ; Thu, 12 Feb 2009 06:55:34 -0600 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 12 Feb 2009 14:55:22 +0200 Received: from mgw-int02.ntc.nokia.com ([172.21.143.97]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 12 Feb 2009 14:55:22 +0200 Received: from localhost.localdomain (esdhcp03954.research.nokia.com [172.21.39.54]) by mgw-int02.ntc.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id n1CCtKRD012452; Thu, 12 Feb 2009 14:55:20 +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 14:54:54 +0200 Message-Id: X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <> References: <> X-OriginalArrivalTime: 12 Feb 2009 12:55:22.0065 (UTC) FILETIME=[2A508410:01C98D11] 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 I2C_OMAP was selected to compile in or as a module. Signed-off-by: Atal Shargorodsky --- 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 175bfd6..fe4738e 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 dss.o + usb.o fb.o io.o dss.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 MMU framework obj-$(CONFIG_OMAP_MMU_FWK) += mmu.o diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index 89a6ab0..08b8681 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c @@ -34,6 +34,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) \ @@ -162,3 +164,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