From 4835ff9aca639107ca0233c10aa854d460c8797d Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Sat, 13 Aug 2011 11:50:48 +0900 Subject: [PATCH] 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 Reported-by: Axel Lin --- sound/soc/soc-io.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 @@ #include +#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 -- 2.20.1