diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-08-10 04:24:12 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-10 11:35:55 -0400 |
commit | f024d9a0854cb3f2d09603d1ed3a52f04778330d (patch) | |
tree | d309a9683fadbff398926a06b2ad7b89031d274b /sound/soc/soc-io.c | |
parent | 53b2bb3a417606953584527b9fbf3feafad376c4 (diff) |
ASoC: soc-io: Add CONFIG_REGMAP_I2C/CONFIG_REGMAP_SPI guards for regmap_init_i2c/regmap_init_spi
In the case of "make da8xx_omapl_defconfig;make", the SPI support is disabled.
Thus calling regmap_init_spi in soc-io.c has below build error.
ERROR: "regmap_init_spi" [sound/soc/snd-soc-core.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
This patch fixes the build error by adding CONFIG_REGMAP_I2C/CONFIG_REGMAP_SPI
guards for regmap_init_i2c/regmap_init_spi.
Signed-off-by: Axel Lin <axel.lin@gmail.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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c index e471ed667fe9..be5aac3d7a1b 100644 --- a/sound/soc/soc-io.c +++ b/sound/soc/soc-io.c | |||
@@ -122,15 +122,19 @@ 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 | case SND_SOC_I2C: | 126 | case SND_SOC_I2C: |
126 | codec->control_data = regmap_init_i2c(to_i2c_client(codec->dev), | 127 | codec->control_data = regmap_init_i2c(to_i2c_client(codec->dev), |
127 | &config); | 128 | &config); |
128 | break; | 129 | break; |
130 | #endif | ||
129 | 131 | ||
132 | #ifdef CONFIG_REGMAP_SPI | ||
130 | case SND_SOC_SPI: | 133 | case SND_SOC_SPI: |
131 | codec->control_data = regmap_init_spi(to_spi_device(codec->dev), | 134 | codec->control_data = regmap_init_spi(to_spi_device(codec->dev), |
132 | &config); | 135 | &config); |
133 | break; | 136 | break; |
137 | #endif | ||
134 | 138 | ||
135 | case SND_SOC_REGMAP: | 139 | case SND_SOC_REGMAP: |
136 | /* Device has made its own regmap arrangements */ | 140 | /* Device has made its own regmap arrangements */ |