diff --git a/include/sound/soc.h b/include/sound/soc.h index 80ca937a20da805604fbf43e46db92c9deecaf9c..b532348359368edbaf61bf76e3cebd8bc035bf16 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); int snd_soc_component_test_bits(struct snd_soc_component *component, unsigned int reg, unsigned int mask, unsigned int value); +#ifdef CONFIG_REGMAP + void snd_soc_component_init_regmap(struct snd_soc_component *component, struct regmap *regmap); void 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) snd_soc_component_exit_regmap(&codec->component); } +#endif + /* device driver data */ static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card, diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index db74c061f5205c8748b9b5c2ad30aab5a3066ad7..1edc519d62868be8bf34f951a8089c72d27021c0 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) {