]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: Support !CONFIG_REGMAP builds
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 13 Aug 2011 02:50:48 +0000 (11:50 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 14 Aug 2011 10:20:54 +0000 (19:20 +0900)
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>
sound/soc/soc-io.c

index 22b64317182b1ac02903e6b8a038976d65116edd..66fcccd79efe9a2cbc8aa591d491f0f15fbc378f 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <trace/events/asoc.h>
 
+#ifdef CONFIG_REGMAP
 static int hw_write(struct snd_soc_codec *codec, unsigned int reg,
                    unsigned int value)
 {
@@ -150,4 +151,12 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
        return 0;
 }
 EXPORT_SYMBOL_GPL(snd_soc_codec_set_cache_io);
-
+#else
+int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
+                              int addr_bits, int data_bits,
+                              enum snd_soc_control_type control)
+{
+       return -ENOTSUPP;
+}
+EXPORT_SYMBOL_GPL(snd_soc_codec_set_cache_io);
+#endif