From: Tony Lindgren <tony@atomide.com>
To: linux-arm-kernel@lists.arm.linux.org.uk
Cc: linux-omap@vger.kernel.org,
Jarkko Nikula <jarkko.nikula@nokia.com>,
Aaro Koskinen <Aaro.Koskinen@nokia.com>
Subject: [PATCH 3/4] ARM: OMAP: Allow I2C bus driver to be compiled as a module
Date: Wed, 04 Mar 2009 10:29:10 -0800 [thread overview]
Message-ID: <20090304182910.27331.77892.stgit@localhost> (raw)
In-Reply-To: <20090304182342.27331.35004.stgit@localhost>
From: Aaro Koskinen <Aaro.Koskinen@nokia.com>
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 <Aaro.Koskinen@nokia.com>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/Makefile | 3 ++-
arch/arm/plat-omap/include/mach/common.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
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);
next prev parent reply other threads:[~2009-03-04 18:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 18:25 [PATCH 0/4] Still more omap fixes for current -rc series Tony Lindgren
2009-03-04 18:26 ` [PATCH 1/4] ARM: OMAP: Fix compile error if pm.h is included Tony Lindgren
2009-03-04 18:27 ` [PATCH 2/4] ARM: OMAP: sched_clock() corrected Tony Lindgren
2009-03-04 18:29 ` Tony Lindgren [this message]
2009-03-04 18:30 ` [PATCH 4/4] ARM: OMAP: board-omap3beagle: set i2c-3 to 100kHz Tony Lindgren
2009-03-07 15:55 ` [PATCH 0/4] Still more omap fixes for current -rc series Tony Lindgren
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=20090304182910.27331.77892.stgit@localhost \
--to=tony@atomide.com \
--cc=Aaro.Koskinen@nokia.com \
--cc=jarkko.nikula@nokia.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--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