diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-05-04 12:46:10 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-05-04 13:31:17 -0400 |
commit | f21d1e22eeeb99794944fd6eedf92c69f125e37f (patch) | |
tree | ee603d4298d420dffde9d1f514f2c73d05835db4 | |
parent | b787f68c36d49bb1d9236f403813641efa74a031 (diff) |
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>
-rw-r--r-- | sound/soc/codecs/adau1977.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c index 7ad8e156e2df..95c0c3958c01 100644 --- a/sound/soc/codecs/adau1977.c +++ b/sound/soc/codecs/adau1977.c | |||
@@ -485,7 +485,7 @@ static int adau1977_set_bias_level(struct snd_soc_codec *codec, | |||
485 | case SND_SOC_BIAS_PREPARE: | 485 | case SND_SOC_BIAS_PREPARE: |
486 | break; | 486 | break; |
487 | case SND_SOC_BIAS_STANDBY: | 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 | ret = adau1977_power_enable(adau1977); | 489 | ret = adau1977_power_enable(adau1977); |
490 | break; | 490 | break; |
491 | case SND_SOC_BIAS_OFF: | 491 | case SND_SOC_BIAS_OFF: |
@@ -853,12 +853,13 @@ static int adau1977_set_sysclk(struct snd_soc_codec *codec, | |||
853 | 853 | ||
854 | static int adau1977_codec_probe(struct snd_soc_codec *codec) | 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 | struct adau1977 *adau1977 = snd_soc_codec_get_drvdata(codec); | 857 | struct adau1977 *adau1977 = snd_soc_codec_get_drvdata(codec); |
857 | int ret; | 858 | int ret; |
858 | 859 | ||
859 | switch (adau1977->type) { | 860 | switch (adau1977->type) { |
860 | case ADAU1977: | 861 | case ADAU1977: |
861 | ret = snd_soc_dapm_new_controls(&codec->dapm, | 862 | ret = snd_soc_dapm_new_controls(dapm, |
862 | adau1977_micbias_dapm_widgets, | 863 | adau1977_micbias_dapm_widgets, |
863 | ARRAY_SIZE(adau1977_micbias_dapm_widgets)); | 864 | ARRAY_SIZE(adau1977_micbias_dapm_widgets)); |
864 | if (ret < 0) | 865 | if (ret < 0) |