Skip to content

Commit

Permalink
ASoC: Use standard cache sync for WM8978
Browse files Browse the repository at this point in the history
Saves a bit of code and supports further refactoring.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Jan 20, 2012
1 parent 623105d commit f98692e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions sound/soc/codecs/wm8978.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit f98692e

Please sign in to comment.