Message ID | cf33789c708e166cea5350a1d3c19e20c6bf0056.1234439236.git.ext-atal.shargorodsky@nokia.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
On Thu, 12 Feb 2009 13:54:54 +0100 "Shargorodsky Atal (EXT-Teleca/Helsinki)" <ext-atal.shargorodsky@nokia.com> 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 I2C_OMAP was selected to compile in > or as a module. > > Signed-off-by: Atal Shargorodsky <ext-atal.shargorodsky@nokia.com> > --- > arch/arm/plat-omap/Makefile | 3 +-- > arch/arm/plat-omap/i2c.c | 4 ++++ > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile > index 175bfd6..fe4738e 100644 > --- a/arch/arm/plat-omap/Makefile > +++ b/arch/arm/plat-omap/Makefile > @@ -4,7 +4,7 @@ > > # Common support > obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \ > - usb.o fb.o io.o dss.o > + usb.o fb.o io.o dss.o i2c.o Can you base this on linux-omap? There is no dss there so patch doesn't apply. Generally I agree the patch since it fixes linking error when CONFIG_I2C_OMAP=m and arch/arm/plat-omap/i2c.o cannot be compiled as a module because it is for board initialization code. Jarkko -- 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 175bfd6..fe4738e 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile @@ -4,7 +4,7 @@ # Common support obj-y := common.o sram.o clock.o devices.o dma.o mux.o gpio.o \ - usb.o fb.o io.o dss.o + usb.o fb.o io.o dss.o i2c.o obj-m := obj-n := obj- := @@ -21,7 +21,6 @@ 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 # OMAP MMU framework obj-$(CONFIG_OMAP_MMU_FWK) += mmu.o diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index 89a6ab0..08b8681 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c @@ -34,6 +34,8 @@ #define OMAP2_I2C_BASE2 0x48072000 #define OMAP2_I2C_BASE3 0x48060000 +#if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) + static const char name[] = "i2c_omap"; #define I2C_RESOURCE_BUILDER(base, irq) \ @@ -162,3 +164,5 @@ int __init omap_register_i2c_bus(int bus_id, u32 clkrate, omap_i2c_mux_pins(bus_id - 1); return platform_device_register(pdev); } + +#endif
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 I2C_OMAP was selected to compile in or as a module. Signed-off-by: Atal Shargorodsky <ext-atal.shargorodsky@nokia.com> --- arch/arm/plat-omap/Makefile | 3 +-- arch/arm/plat-omap/i2c.c | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-)