From fd218aa3e5d4ee522cbfe88ad4dd83eb891096fb Mon Sep 17 00:00:00 2001 From: Jyri Sarha Date: Mon, 17 Mar 2014 09:31:31 +0200 Subject: 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 --- sound/soc/codecs/tlv320aic31xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound/soc/codecs/tlv320aic31xx.c') 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; -- cgit v1.2.3-58-ga151