Skip to content

Commit

Permalink
ARM: OMAP: Allow I2C bus driver to be compiled as a module
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Aaro Koskinen authored and Tony Lindgren committed Mar 4, 2009
1 parent 80ea3ba commit e951651
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion arch/arm/plat-omap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-omap/include/mach/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e951651

Please sign in to comment.