Skip to content

Commit

Permalink
ASoC: fix I2C build errors
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Randy Dunlap authored and Mark Brown committed Aug 11, 2009
1 parent e0c48a1 commit 17244c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/soc-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static unsigned int snd_soc_8_16_read(struct snd_soc_codec *codec,
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)
{
Expand Down Expand Up @@ -200,7 +200,7 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
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)
Expand Down

0 comments on commit 17244c2

Please sign in to comment.