diff options
-rw-r--r-- | include/sound/soc.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index fcb312b3f258..2f742009da4b 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -807,7 +807,7 @@ struct snd_soc_codec { /* component */ struct snd_soc_component component; - /* dapm */ + /* Don't access this directly, use snd_soc_codec_get_dapm() */ struct snd_soc_dapm_context dapm; #ifdef CONFIG_DEBUG_FS @@ -1270,6 +1270,18 @@ static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm( } /** + * snd_soc_codec_get_dapm() - Returns the DAPM context for the CODEC + * @codec: The CODEC for which to get the DAPM context + * + * Note: Use this function instead of directly accessing the CODEC's dapm field + */ +static inline struct snd_soc_dapm_context *snd_soc_codec_get_dapm( + struct snd_soc_codec *codec) +{ + return &codec->dapm; +} + +/** * snd_soc_dapm_kcontrol_codec() - Returns the codec associated to a kcontrol * @kcontrol: The kcontrol * |