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@xxxxxxxxx> --- 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 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 -- 1.5.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html