Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: adau1977: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level() and all
remaining access to codec->dapm with snd_soc_codec_get_dapm().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Lars-Peter Clausen and committed by
Mark Brown
f21d1e22 b787f68c

+3 -2
+3 -2
sound/soc/codecs/adau1977.c
··· 485 485 case SND_SOC_BIAS_PREPARE: 486 486 break; 487 487 case SND_SOC_BIAS_STANDBY: 488 - if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) 488 + if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) 489 489 ret = adau1977_power_enable(adau1977); 490 490 break; 491 491 case SND_SOC_BIAS_OFF: ··· 853 853 854 854 static int adau1977_codec_probe(struct snd_soc_codec *codec) 855 855 { 856 + struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); 856 857 struct adau1977 *adau1977 = snd_soc_codec_get_drvdata(codec); 857 858 int ret; 858 859 859 860 switch (adau1977->type) { 860 861 case ADAU1977: 861 - ret = snd_soc_dapm_new_controls(&codec->dapm, 862 + ret = snd_soc_dapm_new_controls(dapm, 862 863 adau1977_micbias_dapm_widgets, 863 864 ARRAY_SIZE(adau1977_micbias_dapm_widgets)); 864 865 if (ret < 0)