diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-06-01 04:10:48 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-06-01 11:44:47 -0400 |
commit | 93f32f534e0fcbb5cad0734e599e960454caa303 (patch) | |
tree | dc50915eba9ff37faafa824c3443027b5f5c5045 | |
parent | afcd11df6d5acb03339ed96c21e219c510e0de46 (diff) |
ASoC: wm8960: 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/wm8960.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 6fa832b6365b..edd34db9bd25 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c | |||
@@ -445,7 +445,7 @@ static int wm8960_add_widgets(struct snd_soc_codec *codec) | |||
445 | { | 445 | { |
446 | struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); | 446 | struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); |
447 | struct wm8960_data *pdata = &wm8960->pdata; | 447 | struct wm8960_data *pdata = &wm8960->pdata; |
448 | struct snd_soc_dapm_context *dapm = &codec->dapm; | 448 | struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); |
449 | struct snd_soc_dapm_widget *w; | 449 | struct snd_soc_dapm_widget *w; |
450 | 450 | ||
451 | snd_soc_dapm_new_controls(dapm, wm8960_dapm_widgets, | 451 | snd_soc_dapm_new_controls(dapm, wm8960_dapm_widgets, |
@@ -476,7 +476,7 @@ static int wm8960_add_widgets(struct snd_soc_codec *codec) | |||
476 | * and save the result. | 476 | * and save the result. |
477 | */ | 477 | */ |
478 | list_for_each_entry(w, &codec->component.card->widgets, list) { | 478 | list_for_each_entry(w, &codec->component.card->widgets, list) { |
479 | if (w->dapm != &codec->dapm) | 479 | if (w->dapm != dapm) |
480 | continue; | 480 | continue; |
481 | if (strcmp(w->name, "LOUT1 PGA") == 0) | 481 | if (strcmp(w->name, "LOUT1 PGA") == 0) |
482 | wm8960->lout1 = w; | 482 | wm8960->lout1 = w; |
@@ -627,7 +627,7 @@ static int wm8960_set_bias_level_out3(struct snd_soc_codec *codec, | |||
627 | break; | 627 | break; |
628 | 628 | ||
629 | case SND_SOC_BIAS_PREPARE: | 629 | case SND_SOC_BIAS_PREPARE: |
630 | switch (codec->dapm.bias_level) { | 630 | switch (snd_soc_codec_get_bias_level(codec)) { |
631 | case SND_SOC_BIAS_STANDBY: | 631 | case SND_SOC_BIAS_STANDBY: |
632 | if (!IS_ERR(wm8960->mclk)) { | 632 | if (!IS_ERR(wm8960->mclk)) { |
633 | ret = clk_prepare_enable(wm8960->mclk); | 633 | ret = clk_prepare_enable(wm8960->mclk); |
@@ -655,7 +655,7 @@ static int wm8960_set_bias_level_out3(struct snd_soc_codec *codec, | |||
655 | break; | 655 | break; |
656 | 656 | ||
657 | case SND_SOC_BIAS_STANDBY: | 657 | case SND_SOC_BIAS_STANDBY: |
658 | if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { | 658 | if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) { |
659 | regcache_sync(wm8960->regmap); | 659 | regcache_sync(wm8960->regmap); |
660 | 660 | ||
661 | /* Enable anti-pop features */ | 661 | /* Enable anti-pop features */ |
@@ -705,7 +705,7 @@ static int wm8960_set_bias_level_capless(struct snd_soc_codec *codec, | |||
705 | break; | 705 | break; |
706 | 706 | ||
707 | case SND_SOC_BIAS_PREPARE: | 707 | case SND_SOC_BIAS_PREPARE: |
708 | switch (codec->dapm.bias_level) { | 708 | switch (snd_soc_codec_get_bias_level(codec)) { |
709 | case SND_SOC_BIAS_STANDBY: | 709 | case SND_SOC_BIAS_STANDBY: |
710 | /* Enable anti pop mode */ | 710 | /* Enable anti pop mode */ |
711 | snd_soc_update_bits(codec, WM8960_APOP1, | 711 | snd_soc_update_bits(codec, WM8960_APOP1, |
@@ -776,7 +776,7 @@ static int wm8960_set_bias_level_capless(struct snd_soc_codec *codec, | |||
776 | break; | 776 | break; |
777 | 777 | ||
778 | case SND_SOC_BIAS_STANDBY: | 778 | case SND_SOC_BIAS_STANDBY: |
779 | switch (codec->dapm.bias_level) { | 779 | switch (snd_soc_codec_get_bias_level(codec)) { |
780 | case SND_SOC_BIAS_PREPARE: | 780 | case SND_SOC_BIAS_PREPARE: |
781 | /* Disable HP discharge */ | 781 | /* Disable HP discharge */ |
782 | snd_soc_update_bits(codec, WM8960_APOP2, | 782 | snd_soc_update_bits(codec, WM8960_APOP2, |