From cc4c670a416a36464443f465f0ddbdc9940d16dd Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Mon, 6 Jun 2011 19:03:34 +0100 Subject: [PATCH] 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 Acked-by: Liam Girdwood --- sound/soc/soc-dapm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 1682834f8c38..34106bca63cf 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -146,10 +146,13 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm, 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; -- 2.20.1