aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-11-25 15:41:03 -0500
committerMark Brown <broonie@kernel.org>2014-11-25 16:15:31 -0500
commite874bf5f7647a9fdf14d72dbb376ec95327e3a81 (patch)
tree04af5f68f35c1fbb306a8a0b67b8f9a8ef6b67e4 /include/sound
parent17bb577328a00e7251c8e552471b6583173ca77d (diff)
ASoC: Disable regmap helpers if regmap is disabled
If regmap is disabled there will be no users of the ASoC regmap helpers. Furthermore regmap_exit() will no be defined causing the following compile error: sound/soc/soc-core.c: In function 'snd_soc_component_exit_regmap': sound/soc/soc-core.c:2645:2: error: implicit declaration of function 'regmap_exit' [-Werror=implicit-function-declaration] So disable the helpers if regmap is disabled. Reported-by: kbuild test robot <fengguang.wu@intel.com> Fixes: 20feb881988c ASoC: Add helper functions for deferred regmap setup") Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 80ca937a20da..b53234835936 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1286,6 +1286,8 @@ void snd_soc_component_async_complete(struct snd_soc_component *component);
1286int snd_soc_component_test_bits(struct snd_soc_component *component, 1286int snd_soc_component_test_bits(struct snd_soc_component *component,
1287 unsigned int reg, unsigned int mask, unsigned int value); 1287 unsigned int reg, unsigned int mask, unsigned int value);
1288 1288
1289#ifdef CONFIG_REGMAP
1290
1289void snd_soc_component_init_regmap(struct snd_soc_component *component, 1291void snd_soc_component_init_regmap(struct snd_soc_component *component,
1290 struct regmap *regmap); 1292 struct regmap *regmap);
1291void snd_soc_component_exit_regmap(struct snd_soc_component *component); 1293void snd_soc_component_exit_regmap(struct snd_soc_component *component);
@@ -1321,6 +1323,8 @@ static inline void snd_soc_codec_exit_regmap(struct snd_soc_codec *codec)
1321 snd_soc_component_exit_regmap(&codec->component); 1323 snd_soc_component_exit_regmap(&codec->component);
1322} 1324}
1323 1325
1326#endif
1327
1324/* device driver data */ 1328/* device driver data */
1325 1329
1326static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card, 1330static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,