ASoC: Decouple DAPM from CODECs
[deliverable/linux.git] / sound / soc / codecs / wm8990.c
index 264828e4e67c8be0d7e43a8ffd6d2f4d96498d74..309664ea7dc37210b426c5ea77cc12ac3c47e28e 100644 (file)
@@ -914,11 +914,12 @@ static const struct snd_soc_dapm_route audio_map[] = {
 
 static int wm8990_add_widgets(struct snd_soc_codec *codec)
 {
-       snd_soc_dapm_new_controls(codec, wm8990_dapm_widgets,
-                                 ARRAY_SIZE(wm8990_dapm_widgets));
+       struct snd_soc_dapm_context *dapm = &codec->dapm;
 
+       snd_soc_dapm_new_controls(dapm, wm8990_dapm_widgets,
+                                 ARRAY_SIZE(wm8990_dapm_widgets));
        /* set up the WM8990 audio map */
-       snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
+       snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
 
        return 0;
 }
@@ -1170,7 +1171,7 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec,
                break;
 
        case SND_SOC_BIAS_STANDBY:
-               if (codec->bias_level == SND_SOC_BIAS_OFF) {
+               if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
                        /* Enable all output discharge bits */
                        snd_soc_write(codec, WM8990_ANTIPOP1, WM8990_DIS_LLINE |
                                WM8990_DIS_RLINE | WM8990_DIS_OUT3 |
@@ -1266,7 +1267,7 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec,
                break;
        }
 
-       codec->bias_level = level;
+       codec->dapm.bias_level = level;
        return 0;
 }
 
This page took 0.024046 seconds and 5 git commands to generate.