From: Axel Lin Date: Mon, 17 Oct 2011 12:16:37 +0000 (+0800) Subject: ASoC: wm8741: Use snd_soc_cache_sync to sync reg_cache with the hardware X-Git-Tag: MMI-PSA29.97-13-9~16612^2~556 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=df3431b74e72c73e8750bfe1b2a5c99eff958356;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ASoC: wm8741: Use snd_soc_cache_sync to sync reg_cache with the hardware Signed-off-by: Axel Lin Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c index 85ebe029ee17..57ad22aacc51 100644 --- a/sound/soc/codecs/wm8741.c +++ b/sound/soc/codecs/wm8741.c @@ -404,15 +404,7 @@ static struct snd_soc_dai_driver wm8741_dai = { #ifdef CONFIG_PM static int wm8741_resume(struct snd_soc_codec *codec) { - u16 *cache = codec->reg_cache; - 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]); - } + snd_soc_cache_sync(codec); return 0; } #else