提交 171ec6b0 编写于 作者: M Mark Brown

ASoC: Simplify logic in snd_soc_dapm_set_bias_level()

No functional changes but much less indentation.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: NLiam Girdwood <lrg@ti.com>
上级 4113e443
......@@ -143,17 +143,19 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm,
if (card && card->set_bias_level)
ret = card->set_bias_level(card, level);
if (ret == 0) {
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 (ret == 0) {
if (card && card->set_bias_level_post)
ret = card->set_bias_level_post(card, level);
}
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 (ret != 0)
goto out;
if (card && card->set_bias_level_post)
ret = card->set_bias_level_post(card, level);
out:
trace_snd_soc_bias_level_done(card, level);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册