Skip to contentSkip to conversation

ASoC: Support !CONFIG_REGMAP builds

PATCH New Mark Brown 1 participant 1 message Aug 13, 2011

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 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.

---
 sound/soc/soc-io.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
sound/soc/soc-io.c +10 -1
index be5aac3..3f56d52 100644
@@ -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
Signature · 1 line
1.7.5.4