ASoC: Decouple DAPM from CODECs
[deliverable/linux.git] / sound / soc / codecs / wm8750.c
index 6c924cd2cfd45a2149f07ca917a4e36faf8149b0..178b967af73fa6ac262e8365a4da9cfa07a964fe 100644 (file)
@@ -399,10 +399,11 @@ static const struct snd_soc_dapm_route audio_map[] = {
 
 static int wm8750_add_widgets(struct snd_soc_codec *codec)
 {
-       snd_soc_dapm_new_controls(codec, wm8750_dapm_widgets,
-                                 ARRAY_SIZE(wm8750_dapm_widgets));
+       struct snd_soc_dapm_context *dapm = &codec->dapm;
 
-       snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
+       snd_soc_dapm_new_controls(dapm, wm8750_dapm_widgets,
+                                 ARRAY_SIZE(wm8750_dapm_widgets));
+       snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
 
        return 0;
 }
@@ -615,7 +616,7 @@ static int wm8750_set_bias_level(struct snd_soc_codec *codec,
        case SND_SOC_BIAS_PREPARE:
                break;
        case SND_SOC_BIAS_STANDBY:
-               if (codec->bias_level == SND_SOC_BIAS_OFF) {
+               if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
                        /* Set VMID to 5k */
                        snd_soc_write(codec, WM8750_PWR1, pwr_reg | 0x01c1);
 
@@ -630,7 +631,7 @@ static int wm8750_set_bias_level(struct snd_soc_codec *codec,
                snd_soc_write(codec, WM8750_PWR1, 0x0001);
                break;
        }
-       codec->bias_level = level;
+       codec->dapm.bias_level = level;
        return 0;
 }
 
This page took 0.024956 seconds and 5 git commands to generate.