diff mbox

ASoC: tlv320aic31xx: Turn power off only once.

Message ID 1395041491-22152-1-git-send-email-jsarha@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jyri Sarha March 17, 2014, 7:31 a.m. UTC
Regulator code keep count of enables and disables. Double disable
causes an ugly warning.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 sound/soc/codecs/tlv320aic31xx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Mark Brown March 17, 2014, 1:17 p.m. UTC | #1
On Mon, Mar 17, 2014 at 09:31:31AM +0200, Jyri Sarha wrote:
> Regulator code keep count of enables and disables. Double disable
> causes an ugly warning.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index 89f808b..07ddec3 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -1021,7 +1021,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;