public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle•com>
To: Stephen Rothwell <sfr@canb•auug.org.au>,
	Timur Tabi <timur@freescale•com>
Cc: linux-next@vger•kernel.org, LKML <linux-kernel@vger•kernel.org>,
	akpm <akpm@linux-foundation•org>
Subject: [PATCH -next] soc: fix I2C build errors
Date: Mon, 10 Aug 2009 16:04:39 -0700	[thread overview]
Message-ID: <20090810160439.72e417de.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20090810203508.f3258129.sfr@canb.auug.org.au>

From: Randy Dunlap <randy.dunlap@oracle•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@oracle•com>
Cc: Timur Tabi <timur@freescale•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/

  reply	other threads:[~2009-08-10 23:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-10 10:35 linux-next: Tree for August 10 Stephen Rothwell
2009-08-10 23:04 ` Randy Dunlap [this message]
2009-08-11  9:56   ` [PATCH -next] soc: fix I2C build errors Mark Brown
2009-08-10 23:04 ` [PATCH -next] dvb: siano uses/depends on INPUT Randy Dunlap

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=20090810160439.72e417de.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle$(echo .)com \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=sfr@canb$(echo .)auug.org.au \
    --cc=timur@freescale$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox