From: Mark Brown Date: Wed, 19 Aug 2009 13:18:53 +0000 (+0100) Subject: ASoC: Provide default set_bias_level() implementation X-Git-Tag: v3.12-rc1~11670^2~186 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=474e09ca017bd0f6e9bf41af643364a21bc27f43;p=kernel%2Fkernel-generic.git ASoC: Provide default set_bias_level() implementation If the CODEC does not provide a set_bias_level() then update the bias_level variable for it since other parts of the system expect that to be maintained. Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 8846131..5cfc909 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -148,8 +148,12 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_device *socdev, if (card->set_bias_level) ret = card->set_bias_level(card, level); - if (ret == 0 && codec->set_bias_level) - ret = codec->set_bias_level(codec, level); + if (ret == 0) { + if (codec->set_bias_level) + ret = codec->set_bias_level(codec, level); + else + codec->bias_level = level; + } return ret; }