[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090810160439.72e417de.randy.dunlap@oracle.com>
Date: Mon, 10 Aug 2009 16:04:39 -0700
From: Randy Dunlap <randy.dunlap@...cle.com>
To: Stephen Rothwell <sfr@...b.auug.org.au>,
Timur Tabi <timur@...escale.com>
Cc: linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
akpm <akpm@...ux-foundation.org>
Subject: [PATCH -next] soc: fix I2C build errors
From: Randy Dunlap <randy.dunlap@...cle.com>
Fix soc build errors when I2C is built as a loadable module:
(.text+0x5d26b): undefined reference to `i2c_master_send'
soc-cache.c:(.text+0x5d32d): undefined reference to `i2c_transfer'
Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>
Cc: Timur Tabi <timur@...escale.com>
---
sound/soc/soc-cache.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-next-20090810.orig/sound/soc/soc-cache.c
+++ linux-next-20090810/sound/soc/soc-cache.c
@@ -108,7 +108,7 @@ static unsigned int snd_soc_8_16_read(st
return cache[reg];
}
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE))
static unsigned int snd_soc_8_16_read_i2c(struct snd_soc_codec *codec,
unsigned int r)
{
@@ -200,7 +200,7 @@ int snd_soc_codec_set_cache_io(struct sn
break;
case SND_SOC_I2C:
-#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
+#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE))
codec->hw_write = (hw_write_t)i2c_master_send;
#endif
if (io_types[i].i2c_read)
---
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists