diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-08-11 11:59:11 -0600 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-12 11:51:42 +0900 |
commit | 81bca7624db4720db686fa38435c39ea95b7be8f (patch) | |
tree | 0fa1f2f9363d85a2ef49703968a4a1a8207eb1df /sound | |
parent | 68d5a59e0ceb69fe8e4123666d9398c3c1331d8a (diff) |
ASoC: soc-io: Fix CONFIG_REGMAP_I2C/SPI guards to support regmap modules
When CONFIG_REGMAP_I2C/SPI are m, CONFIG_REGMAP_I2C_MODULE is set in the
pre-processor instead of CONFIG_REGMAP_I2C. This removes SND_SOC_I2C as a
valid option for snd_soc_codec_set_cache_io()'s control parameter, and
causes any ASoC regmap-using codec built as a module to fail to initialize.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c index be5aac3d7a1b..22b64317182b 100644 --- a/sound/soc/soc-io.c +++ b/sound/soc/soc-io.c @@ -122,14 +122,14 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, config.val_bits = data_bits; switch (control) { -#ifdef CONFIG_REGMAP_I2C +#if defined(CONFIG_REGMAP_I2C) || defined(CONFIG_REGMAP_I2C_MODULE) case SND_SOC_I2C: codec->control_data = regmap_init_i2c(to_i2c_client(codec->dev), &config); break; #endif -#ifdef CONFIG_REGMAP_SPI +#if defined(CONFIG_REGMAP_SPI) || defined(CONFIG_REGMAP_SPI_MODULE) case SND_SOC_SPI: codec->control_data = regmap_init_spi(to_spi_device(codec->dev), &config); |