From: Jyri Sarha Date: Mon, 17 Mar 2014 07:31:31 +0000 (+0200) Subject: ASoC: tlv320aic31xx: Turn power off only once. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fd218aa3e5d4ee522cbfe88ad4dd83eb891096fb;p=linux-beck.git ASoC: tlv320aic31xx: Turn power off only once. Regulator code keep count of enables and disables. Double disable causes an ugly warning. Signed-off-by: Jyri Sarha Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c index d3517a919776..1f243c2c98fd 100644 --- a/sound/soc/codecs/tlv320aic31xx.c +++ b/sound/soc/codecs/tlv320aic31xx.c @@ -1020,7 +1020,8 @@ static int aic31xx_set_bias_level(struct snd_soc_codec *codec, } break; case SND_SOC_BIAS_OFF: - aic31xx_power_off(codec); + if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) + aic31xx_power_off(codec); break; } codec->dapm.bias_level = level;