public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] Allow I2C_OMAP to compile as a module.
@ 2009-02-12 14:10 Atal Shargorodsky
  2009-02-13  6:58 ` Jarkko Nikula
  0 siblings, 1 reply; 21+ messages in thread
From: Atal Shargorodsky @ 2009-02-12 14:10 UTC (permalink / raw)
  To: linux-omap; +Cc: Atal Shargorodsky

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@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 b3f0e6b..3617bfe 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
+	 usb.o fb.o io.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 mailbox framework
 obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c
index 467531e..a98a07f 100644
--- a/arch/arm/plat-omap/i2c.c
+++ b/arch/arm/plat-omap/i2c.c
@@ -35,6 +35,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)			\
@@ -163,3 +165,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


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [PATCH 1/1] Allow I2C_OMAP to compile as a module.
@ 2009-02-12 12:54 Atal Shargorodsky
  2009-02-12 13:10 ` Jarkko Nikula
  0 siblings, 1 reply; 21+ messages in thread
From: Atal Shargorodsky @ 2009-02-12 12:54 UTC (permalink / raw)
  To: linux-omap; +Cc: Atal Shargorodsky

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
 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


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2009-02-19  0:15 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-12 14:10 [PATCH 1/1] Allow I2C_OMAP to compile as a module Atal Shargorodsky
2009-02-13  6:58 ` Jarkko Nikula
2009-02-13 22:21   ` Tony Lindgren
2009-02-15 19:35     ` Jarkko Nikula
2009-02-15 19:45       ` Jarkko Nikula
2009-02-16 16:40         ` Aaro Koskinen
2009-02-16 23:09           ` Tony Lindgren
2009-02-17  9:25           ` Jarkko Nikula
2009-02-17 23:50             ` Tony Lindgren
2009-02-17 23:59               ` Otto Solares
2009-02-18  0:07                 ` Tony Lindgren
2009-02-18  9:22               ` [PATCH] ARM: OMAP: Allow I2C bus driver to be compiled " Aaro Koskinen
2009-02-18  9:45                 ` Jarkko Nikula
2009-02-18 23:40                   ` Tony Lindgren
2009-02-18 23:43                     ` Otto Solares
2009-02-18 23:59                       ` Tony Lindgren
2009-02-19  0:15                         ` Otto Solares
2009-02-16 23:09         ` [PATCH 1/1] Allow I2C_OMAP to compile " Tony Lindgren
2009-02-15 20:47       ` Felipe Balbi
  -- strict thread matches above, loose matches on Subject: below --
2009-02-12 12:54 Atal Shargorodsky
2009-02-12 13:10 ` Jarkko Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox