ASoC: Only provide a default bias level update for CODEC contexts
This allows the card driver to use the bias level variable more easily in
multi component systems.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 1682834..34106bc 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -146,10 +146,13 @@
if (ret != 0)
goto out;
- if (dapm->codec && dapm->codec->driver->set_bias_level)
- ret = dapm->codec->driver->set_bias_level(dapm->codec, level);
- else
- dapm->bias_level = level;
+ 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;
+ }
if (ret != 0)
goto out;