Commit 898f8b0b authored by Seungwhan Youn's avatar Seungwhan Youn Committed by Mark Brown

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: default avatarSeungwhan Youn <sw.youn@samsung.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent f6fcdc14
...@@ -414,12 +414,16 @@ static int snd_soc_hw_bulk_write_raw(struct snd_soc_codec *codec, unsigned int r ...@@ -414,12 +414,16 @@ static int snd_soc_hw_bulk_write_raw(struct snd_soc_codec *codec, unsigned int r
return -EINVAL; return -EINVAL;
switch (codec->control_type) { switch (codec->control_type) {
#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE))
case SND_SOC_I2C: case SND_SOC_I2C:
ret = i2c_master_send(codec->control_data, data, len); ret = i2c_master_send(codec->control_data, data, len);
break; break;
#endif
#if defined(CONFIG_SPI_MASTER)
case SND_SOC_SPI: case SND_SOC_SPI:
ret = do_spi_write(codec->control_data, data, len); ret = do_spi_write(codec->control_data, data, len);
break; break;
#endif
default: default:
BUG(); BUG();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment