aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-cache.c
diff options
context:
space:
mode:
authorSeungwhan Youn <sw.youn@samsung.com>2011-04-04 00:43:42 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-04-04 19:23:00 -0400
commit898f8b0b65715843f7afd86f3867270dc9ed8b74 (patch)
tree2a650bc7bfbbce45eefd71aea4d808c61dd540cf /sound/soc/soc-cache.c
parentf6fcdc145679f5c86ff3fe587b060c9c3709d360 (diff)
ASoC: Fix to avoid compile error
This patch fixes to avoid compile error when ASoC codec doesn't use I2C nor SPI on snd_soc_hw_bulk_write_raw(). Signed-off-by: Seungwhan Youn <sw.youn@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-cache.c')
-rw-r--r--sound/soc/soc-cache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c
index 22b099076223..8418b1fa1976 100644
--- a/sound/soc/soc-cache.c
+++ b/sound/soc/soc-cache.c
@@ -414,12 +414,16 @@ static int snd_soc_hw_bulk_write_raw(struct snd_soc_codec *codec, unsigned int r
414 return -EINVAL; 414 return -EINVAL;
415 415
416 switch (codec->control_type) { 416 switch (codec->control_type) {
417#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE))
417 case SND_SOC_I2C: 418 case SND_SOC_I2C:
418 ret = i2c_master_send(codec->control_data, data, len); 419 ret = i2c_master_send(codec->control_data, data, len);
419 break; 420 break;
421#endif
422#if defined(CONFIG_SPI_MASTER)
420 case SND_SOC_SPI: 423 case SND_SOC_SPI:
421 ret = do_spi_write(codec->control_data, data, len); 424 ret = do_spi_write(codec->control_data, data, len);
422 break; 425 break;
426#endif
423 default: 427 default:
424 BUG(); 428 BUG();
425 } 429 }