Skip to content

Commit

Permalink
ASoC: Fix to avoid compile error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Seungwhan Youn authored and Mark Brown committed Apr 4, 2011
1 parent f6fcdc1 commit 898f8b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sound/soc/soc-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 898f8b0

Please sign in to comment.