aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-12 22:50:48 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-14 06:20:54 -0400
commit4835ff9aca639107ca0233c10aa854d460c8797d (patch)
treea2dd84a6f66eb8c9261dbd79a9951988daad7aa0
parentafe8db5f756ceb017dbcf2800f9a7302ee49a385 (diff)
ASoC: Support !CONFIG_REGMAP builds
Since we changed regmap to be selected and register per bus rather than via the core only we can't rely on it being enabled by the ASoC core. Support compiling it out. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reported-by: Axel Lin <axel.lin@gmail.com>
-rw-r--r--sound/soc/soc-io.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c
index 22b64317182b..66fcccd79efe 100644
--- a/sound/soc/soc-io.c
+++ b/sound/soc/soc-io.c
@@ -18,6 +18,7 @@
18 18
19#include <trace/events/asoc.h> 19#include <trace/events/asoc.h>
20 20
21#ifdef CONFIG_REGMAP
21static int hw_write(struct snd_soc_codec *codec, unsigned int reg, 22static int hw_write(struct snd_soc_codec *codec, unsigned int reg,
22 unsigned int value) 23 unsigned int value)
23{ 24{
@@ -150,4 +151,12 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
150 return 0; 151 return 0;
151} 152}
152EXPORT_SYMBOL_GPL(snd_soc_codec_set_cache_io); 153EXPORT_SYMBOL_GPL(snd_soc_codec_set_cache_io);
153 154#else
155int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
156 int addr_bits, int data_bits,
157 enum snd_soc_control_type control)
158{
159 return -ENOTSUPP;
160}
161EXPORT_SYMBOL_GPL(snd_soc_codec_set_cache_io);
162#endif