ASoC: Add a set_bias_level() callback to the DAPM context struct
[deliverable/linux.git] / sound / soc / soc-dapm.c
index fab1a8813abf0ad1273be98759a538a088f4c20f..6c94a6b3fce75a8e6a8e53a604a76f1bdd994c05 100644 (file)
@@ -427,15 +427,10 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm,
        if (ret != 0)
                goto out;
 
-       if (dapm->codec) {
-               if (dapm->codec->driver->set_bias_level)
-                       ret = dapm->codec->driver->set_bias_level(dapm->codec,
-                                                                 level);
-               else
-                       dapm->bias_level = level;
-       } else if (!card || dapm != &card->dapm) {
+       if (dapm->set_bias_level)
+               ret = dapm->set_bias_level(dapm, level);
+       else if (!card || dapm != &card->dapm)
                dapm->bias_level = level;
-       }
 
        if (ret != 0)
                goto out;
This page took 0.02728 seconds and 5 git commands to generate.