Re: [PATCH 1/1] Allow I2C_OMAP to compile as a module.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Jarkko Nikula <jarkko.nikula@xxxxxxxxx> [090212 22:58]:
> On Thu, 12 Feb 2009 15:10:29 +0100
> "Shargorodsky Atal (EXT-Teleca/Helsinki)"
> <ext-atal.shargorodsky@xxxxxxxxx> wrote:
> 
> > 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 either I2C_OMAP was selected to compile
> > in or as a module.
> > 
> > Signed-off-by: Atal Shargorodsky <ext-atal.shargorodsky@xxxxxxxxx>
> > ---
> >  arch/arm/plat-omap/Makefile |    3 +--
> >  arch/arm/plat-omap/i2c.c    |    4 ++++
> >  2 files changed, 5 insertions(+), 2 deletions(-)
> > 
> Tony,
> 
> You can add this to your 2.6.29-rc series since the same build error is
> in mainline as well if CONFIG_I2C_OMAP=m.
> 
>   Building modules, stage 2.
>   GZIP    arch/arm/boot/compressed/piggy.gz
>   MODPOST 6 modules
> ERROR: "i2c_register_board_info" [arch/arm/plat-omap/i2c.ko] undefined!
> make[1]: *** [__modpost] Error 1
> make: *** [modules] Error 2
> make: *** Waiting for unfinished jobs....
> 
> Subject needs a "ARM: OMAP: " prefix, otherwise ok from me.
> 
> Acked-by: Jarkko Nikula <jarkko.nikula@xxxxxxxxx>

Sounds like a fix, except I posted a shorter version of the patch that
should do the trick (untested). Attached here too for reference.

Tony
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -21,7 +21,10 @@ 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
+
+ifneq ($(CONFIG_I2C_OMAP),)
+	obj-$(CONFIG_I2C_OMAP)		+= i2c.o
+endif
 
 # OMAP mailbox framework
 obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux