All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aaro Koskinen <Aaro.Koskinen@nokia.com>
To: tony@atomide.com
Cc: linux-omap@vger.kernel.org, jarkko.nikula@nokia.com,
	ext-atal.shargorodsky@nokia.com
Subject: [PATCH] ARM: OMAP: Allow I2C bus driver to be compiled as a module
Date: Wed, 18 Feb 2009 11:22:18 +0200	[thread overview]
Message-ID: <1234948938-6979-1-git-send-email-Aaro.Koskinen@nokia.com> (raw)
In-Reply-To: <20090217235018.GF11928@atomide.com>

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>
---
 arch/arm/plat-omap/Makefile              |    3 ++-
 arch/arm/plat-omap/include/mach/common.h |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index b3f0e6b..3ebc09e 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -21,7 +21,8 @@ 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
+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
diff --git a/arch/arm/plat-omap/include/mach/common.h b/arch/arm/plat-omap/include/mach/common.h
index af4105f..8c1b965 100644
--- a/arch/arm/plat-omap/include/mach/common.h
+++ b/arch/arm/plat-omap/include/mach/common.h
@@ -33,7 +33,7 @@ struct sys_timer;
 
 extern void omap_map_common_io(void);
 extern struct sys_timer omap_timer;
-#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);
-- 
1.5.4.3


  parent reply	other threads:[~2009-02-18  9:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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               ` Aaro Koskinen [this message]
2009-02-18  9:45                 ` [PATCH] ARM: OMAP: Allow I2C bus driver to be compiled " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1234948938-6979-1-git-send-email-Aaro.Koskinen@nokia.com \
    --to=aaro.koskinen@nokia.com \
    --cc=ext-atal.shargorodsky@nokia.com \
    --cc=jarkko.nikula@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.