aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-06-01 04:11:01 -0400
committerMark Brown <broonie@kernel.org>2015-06-01 11:45:43 -0400
commita01ddd388d4789af6124889d11cc27f6263a9af1 (patch)
treedc25921d1b36ce21fc6b1e9a360c3969d4501fff
parent8e09bac78a48f738f3a180fe213198ab225c807e (diff)
ASoC: wm8995: 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 replace all other manual access to codec->dapm with snd_soc_codec_get_dapm(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/wm8995.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c
index 47af27fb339a..687c4dd7ec99 100644
--- a/sound/soc/codecs/wm8995.c
+++ b/sound/soc/codecs/wm8995.c
@@ -721,6 +721,7 @@ static int configure_aif_clock(struct snd_soc_codec *codec, int aif)
721 721
722static int configure_clock(struct snd_soc_codec *codec) 722static int configure_clock(struct snd_soc_codec *codec)
723{ 723{
724 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
724 struct wm8995_priv *wm8995; 725 struct wm8995_priv *wm8995;
725 int change, new; 726 int change, new;
726 727
@@ -751,7 +752,7 @@ static int configure_clock(struct snd_soc_codec *codec)
751 if (!change) 752 if (!change)
752 return 0; 753 return 0;
753 754
754 snd_soc_dapm_sync(&codec->dapm); 755 snd_soc_dapm_sync(dapm);
755 756
756 return 0; 757 return 0;
757} 758}
@@ -1965,7 +1966,7 @@ static int wm8995_set_bias_level(struct snd_soc_codec *codec,
1965 case SND_SOC_BIAS_PREPARE: 1966 case SND_SOC_BIAS_PREPARE:
1966 break; 1967 break;
1967 case SND_SOC_BIAS_STANDBY: 1968 case SND_SOC_BIAS_STANDBY:
1968 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { 1969 if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) {
1969 ret = regulator_bulk_enable(ARRAY_SIZE(wm8995->supplies), 1970 ret = regulator_bulk_enable(ARRAY_SIZE(wm8995->supplies),
1970 wm8995->supplies); 1971 wm8995->supplies);
1971 if (ret) 1972 if (ret)