ASoC: Avoid writing to WM8971_RESET in wm8971_resume
authorAxel Lin <axel.lin@gmail.com>
Mon, 3 Oct 2011 23:44:22 +0000 (07:44 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 4 Oct 2011 15:04:30 +0000 (16:04 +0100)
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 <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/wm8971.c

index ce33a94b6aadea919e9f6feec41d1871b6d35ae3..08ea6f832365c296ce48c347ec4b3cb4af90642d 100644 (file)
@@ -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;