ASoC: Decouple DAPM from CODECs
[deliverable/linux.git] / sound / soc / codecs / twl6040.c
index 10f6e521451161dbdd169b59d69101a3010f41c3..0dd2d539726408c8e498795bfe8aa489731b196f 100644 (file)
@@ -641,12 +641,12 @@ static const struct snd_soc_dapm_route intercon[] = {
 
 static int twl6040_add_widgets(struct snd_soc_codec *codec)
 {
-       snd_soc_dapm_new_controls(codec, twl6040_dapm_widgets,
-                                ARRAY_SIZE(twl6040_dapm_widgets));
-
-       snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
+       struct snd_soc_dapm_context *dapm = &codec->dapm;
 
-       snd_soc_dapm_new_widgets(codec);
+       snd_soc_dapm_new_controls(dapm, twl6040_dapm_widgets,
+                                ARRAY_SIZE(twl6040_dapm_widgets));
+       snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
+       snd_soc_dapm_new_widgets(dapm);
 
        return 0;
 }
@@ -739,7 +739,7 @@ static int twl6040_set_bias_level(struct snd_soc_codec *codec,
                break;
        }
 
-       codec->bias_level = level;
+       codec->dapm.bias_level = level;
 
        return 0;
 }
This page took 0.025546 seconds and 5 git commands to generate.