From 1a3bbb40da5c01e422309f52475e91886c573718 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Tue, 4 Oct 2011 07:44:22 +0800 Subject: [PATCH] ASoC: Avoid writing to WM8971_RESET in wm8971_resume Writing to WM8971_RESET resets all registers to the default state. Thus we should avoid writing to WM8971_RESET on resume. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- sound/soc/codecs/wm8971.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c index ce33a94..08ea6f8 100644 --- a/sound/soc/codecs/wm8971.c +++ b/sound/soc/codecs/wm8971.c @@ -612,7 +612,7 @@ static int wm8971_resume(struct snd_soc_codec *codec) /* Sync reg_cache with the hardware */ for (i = 0; i < ARRAY_SIZE(wm8971_reg); i++) { - if (i + 1 == WM8971_RESET) + if (i == WM8971_RESET) continue; data[0] = (i << 1) | ((cache[i] >> 8) & 0x0001); data[1] = cache[i] & 0x00ff; -- 2.7.4