From patchwork Wed Mar 4 18:29:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 9886 X-Patchwork-Delegate: tony@atomide.com 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 n24ITGaN018041 for ; Wed, 4 Mar 2009 18:29:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753758AbZCDS3Q (ORCPT ); Wed, 4 Mar 2009 13:29:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753914AbZCDS3Q (ORCPT ); Wed, 4 Mar 2009 13:29:16 -0500 Received: from mho-01-bos.mailhop.org ([63.208.196.178]:50206 "EHLO mho-01-bos.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753758AbZCDS3Q (ORCPT ); Wed, 4 Mar 2009 13:29:16 -0500 Received: from c-69-181-40-92.hsd1.ca.comcast.net ([69.181.40.92] helo=[127.0.0.1]) by mho-01-bos.mailhop.org with esmtpa (Exim 4.68) (envelope-from ) id 1LevqC-000M3k-Py; Wed, 04 Mar 2009 18:29:13 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 69.181.40.92 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19rIc56qpYnMcsDF5c6PL2H Subject: [PATCH 3/4] ARM: OMAP: Allow I2C bus driver to be compiled as a module To: linux-arm-kernel@lists.arm.linux.org.uk From: Tony Lindgren Cc: linux-omap@vger.kernel.org, Jarkko Nikula , Aaro Koskinen Date: Wed, 04 Mar 2009 10:29:10 -0800 Message-ID: <20090304182910.27331.77892.stgit@localhost> In-Reply-To: <20090304182342.27331.35004.stgit@localhost> References: <20090304182342.27331.35004.stgit@localhost> User-Agent: StGit/0.14.3.343.g0584 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Aaro Koskinen Fixes a linker error when OMAP I2C bus driver is compiled as a module: ERROR: "i2c_register_board_info" [arch/arm/plat-omap/i2c.ko] undefined! The I2C utility functions used for board initialization should be always built-in. Signed-off-by: Aaro Koskinen Acked-by: Jarkko Nikula Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/Makefile | 3 ++- arch/arm/plat-omap/include/mach/common.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile index deaff58..04a100c 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile @@ -18,7 +18,8 @@ obj-$(CONFIG_CPU_FREQ) += cpu-omap.o obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o -obj-$(CONFIG_I2C_OMAP) += i2c.o +i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o +obj-y += $(i2c-omap-m) $(i2c-omap-y) # OMAP mailbox framework obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o diff --git a/arch/arm/plat-omap/include/mach/common.h b/arch/arm/plat-omap/include/mach/common.h index ef70e2b..e746ec7 100644 --- a/arch/arm/plat-omap/include/mach/common.h +++ b/arch/arm/plat-omap/include/mach/common.h @@ -35,7 +35,7 @@ extern void omap_map_common_io(void); extern struct sys_timer omap_timer; extern void omap_serial_init(void); extern void omap_serial_enable_clocks(int enable); -#ifdef CONFIG_I2C_OMAP +#if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) extern int omap_register_i2c_bus(int bus_id, u32 clkrate, struct i2c_board_info const *info, unsigned len);