Commit df3431b7 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

ASoC: wm8741: Use snd_soc_cache_sync to sync reg_cache with the hardware

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 3a340104
...@@ -404,15 +404,7 @@ static struct snd_soc_dai_driver wm8741_dai = { ...@@ -404,15 +404,7 @@ static struct snd_soc_dai_driver wm8741_dai = {
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int wm8741_resume(struct snd_soc_codec *codec) static int wm8741_resume(struct snd_soc_codec *codec)
{ {
u16 *cache = codec->reg_cache; snd_soc_cache_sync(codec);
int i;
/* RESTORE REG Cache */
for (i = 0; i < WM8741_REGISTER_COUNT; i++) {
if (cache[i] == wm8741_reg_defaults[i] || WM8741_RESET == i)
continue;
snd_soc_write(codec, i, cache[i]);
}
return 0; return 0;
} }
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment