aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-io.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-08-11 13:59:11 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-11 22:51:42 -0400
commit81bca7624db4720db686fa38435c39ea95b7be8f (patch)
tree0fa1f2f9363d85a2ef49703968a4a1a8207eb1df /sound/soc/soc-io.c
parent68d5a59e0ceb69fe8e4123666d9398c3c1331d8a (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/soc/soc-io.c')
-rw-r--r--sound/soc/soc-io.c4
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,
122 config.val_bits = data_bits; 122 config.val_bits = data_bits;
123 123
124 switch (control) { 124 switch (control) {
125#ifdef CONFIG_REGMAP_I2C 125#if defined(CONFIG_REGMAP_I2C) || defined(CONFIG_REGMAP_I2C_MODULE)
126 case SND_SOC_I2C: 126 case SND_SOC_I2C:
127 codec->control_data = regmap_init_i2c(to_i2c_client(codec->dev), 127 codec->control_data = regmap_init_i2c(to_i2c_client(codec->dev),
128 &config); 128 &config);
129 break; 129 break;
130#endif 130#endif
131 131
132#ifdef CONFIG_REGMAP_SPI 132#if defined(CONFIG_REGMAP_SPI) || defined(CONFIG_REGMAP_SPI_MODULE)
133 case SND_SOC_SPI: 133 case SND_SOC_SPI:
134 codec->control_data = regmap_init_spi(to_spi_device(codec->dev), 134 codec->control_data = regmap_init_spi(to_spi_device(codec->dev),
135 &config); 135 &config);