diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-29 11:32:09 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-20 13:58:19 +0000 |
commit | f98692ea6dda68c7eda6d53a3bc850702c3b8fde (patch) | |
tree | 77ffc9e4b18e32b4b6dcd7e64d4b6f79c7073d7b /sound/soc | |
parent | 623105dc97010f851f8fd22b7ce80b77d860b5f4 (diff) |
ASoC: Use standard cache sync for WM8978
Saves a bit of code and supports further refactoring.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/wm8978.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c index 051f5d0d37d6..0ab339c034e6 100644 --- a/sound/soc/codecs/wm8978.c +++ b/sound/soc/codecs/wm8978.c @@ -891,16 +891,9 @@ static int wm8978_suspend(struct snd_soc_codec *codec) static int wm8978_resume(struct snd_soc_codec *codec) { struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec); - int i; - u16 *cache = codec->reg_cache; /* Sync reg_cache with the hardware */ - for (i = 0; i < ARRAY_SIZE(wm8978_reg); i++) { - if (i == WM8978_RESET) - continue; - if (cache[i] != wm8978_reg[i]) - snd_soc_write(codec, i, cache[i]); - } + snd_soc_cache_sync(codec); wm8978_set_bias_level(codec, SND_SOC_BIAS_STANDBY); |