ASoC: Use standard cache sync code in wm8961
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 16 Dec 2011 06:57:11 +0000 (07:57 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 17 Dec 2011 09:39:44 +0000 (09:39 +0000)
We write the reset register with the default value so it should not be
mistakenly written.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/wm8961.c

index 8bcc17a613299f6a15cf8e59dde93f85ceaf760a..4f20c72a0f1d329a824ee2255f6003ef741c07da 100644 (file)
@@ -1047,18 +1047,7 @@ static int wm8961_suspend(struct snd_soc_codec *codec)
 
 static int wm8961_resume(struct snd_soc_codec *codec)
 {
-       u16 *reg_cache = codec->reg_cache;
-       int i;
-
-       for (i = 0; i < codec->driver->reg_cache_size; i++) {
-               if (reg_cache[i] == wm8961_reg_defaults[i])
-                       continue;
-
-               if (i == WM8961_SOFTWARE_RESET)
-                       continue;
-
-               snd_soc_write(codec, i, reg_cache[i]);
-       }
+       snd_soc_cache_sync(codec);
 
        wm8961_set_bias_level(codec, SND_SOC_BIAS_STANDBY);