diff options
author | Seungwhan Youn <sw.youn@samsung.com> | 2011-04-04 13:43:42 +0900 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-04-05 08:23:00 +0900 |
commit | 898f8b0b65715843f7afd86f3867270dc9ed8b74 (patch) | |
tree | 2a650bc7bfbbce45eefd71aea4d808c61dd540cf /sound/soc/soc-cache.c | |
parent | f6fcdc145679f5c86ff3fe587b060c9c3709d360 (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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index 22b09907622..8418b1fa197 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 return -EINVAL; switch (codec->control_type) { +#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE)) case SND_SOC_I2C: ret = i2c_master_send(codec->control_data, data, len); break; +#endif +#if defined(CONFIG_SPI_MASTER) case SND_SOC_SPI: ret = do_spi_write(codec->control_data, data, len); break; +#endif default: BUG(); } |