diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-11-25 21:41:03 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-25 22:15:31 +0100 |
commit | e874bf5f7647a9fdf14d72dbb376ec95327e3a81 (patch) | |
tree | 04af5f68f35c1fbb306a8a0b67b8f9a8ef6b67e4 /sound/soc/soc-core.c | |
parent | ASoC: ad1980: Remove ac97_read/ac97_write wrappers (diff) | |
download | linux-e874bf5f7647a9fdf14d72dbb376ec95327e3a81.tar.xz linux-e874bf5f7647a9fdf14d72dbb376ec95327e3a81.zip |
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 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index db74c061f520..1edc519d6286 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3661,6 +3661,8 @@ static void snd_soc_component_setup_regmap(struct snd_soc_component *component) component->val_bytes = val_bytes; } +#ifdef CONFIG_REGMAP + /** * snd_soc_component_init_regmap() - Initialize regmap instance for the component * @component: The component for which to initialize the regmap instance @@ -3696,6 +3698,8 @@ void snd_soc_component_exit_regmap(struct snd_soc_component *component) } EXPORT_SYMBOL_GPL(snd_soc_component_exit_regmap); +#endif + static void snd_soc_component_add_unlocked(struct snd_soc_component *component) { if (!component->write && !component->read) { |