diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-10-17 08:16:37 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-17 17:47:01 -0400 |
commit | df3431b74e72c73e8750bfe1b2a5c99eff958356 (patch) | |
tree | 34f95f2290014137cc73ef16bc3690c849bf16a9 /sound | |
parent | 3a340104fad6ecbea5ad6792a2ea855f0507a6e0 (diff) |
ASoC: wm8741: Use snd_soc_cache_sync to sync reg_cache with the hardware
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm8741.c | 10 |
1 files changed, 1 insertions, 9 deletions
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 = { | |||
404 | #ifdef CONFIG_PM | 404 | #ifdef CONFIG_PM |
405 | static int wm8741_resume(struct snd_soc_codec *codec) | 405 | static int wm8741_resume(struct snd_soc_codec *codec) |
406 | { | 406 | { |
407 | u16 *cache = codec->reg_cache; | 407 | snd_soc_cache_sync(codec); |
408 | int i; | ||
409 | |||
410 | /* RESTORE REG Cache */ | ||
411 | for (i = 0; i < WM8741_REGISTER_COUNT; i++) { | ||
412 | if (cache[i] == wm8741_reg_defaults[i] || WM8741_RESET == i) | ||
413 | continue; | ||
414 | snd_soc_write(codec, i, cache[i]); | ||
415 | } | ||
416 | return 0; | 408 | return 0; |
417 | } | 409 | } |
418 | #else | 410 | #else |