]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Allow I2C bus driver to be compiled as a module
authorAaro Koskinen <Aaro.Koskinen@nokia.com>
Wed, 18 Feb 2009 09:22:18 +0000 (09:22 +0000)
committerTony Lindgren <tony@atomide.com>
Wed, 18 Feb 2009 23:35:36 +0000 (15:35 -0800)
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
arch/arm/plat-omap/include/mach/common.h

index b3f0e6be3696b2e98fc9900c0c46295fdfc275fd..3ebc09ed0f6c8ea466796026b2c3a757586e49f0 100644 (file)
@@ -21,7 +21,8 @@ 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
+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
index af4105fd5ef2e1c6c80ee1dfea6f16d03e97cb82..8c1b9655b8bb074e56f025f2ebd629edc37b7198 100644 (file)
@@ -33,7 +33,7 @@ struct sys_timer;
 
 extern void omap_map_common_io(void);
 extern struct sys_timer omap_timer;
-#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);