Skip to content

Commit

Permalink
ASoC: Use standard cache sync for wm8804
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Jan 20, 2012
1 parent c2562a8 commit e055cd6
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions sound/soc/codecs/wm8804.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,24 +482,6 @@ static int wm8804_set_clkdiv(struct snd_soc_dai *dai,
return 0;
}

static void wm8804_sync_cache(struct snd_soc_codec *codec)
{
short i;
u8 *cache;

if (!codec->cache_sync)
return;

codec->cache_only = 0;
cache = codec->reg_cache;
for (i = 0; i < codec->driver->reg_cache_size; i++) {
if (i == WM8804_RST_DEVID1 || cache[i] == wm8804_reg_defs[i])
continue;
snd_soc_write(codec, i, cache[i]);
}
codec->cache_sync = 0;
}

static int wm8804_set_bias_level(struct snd_soc_codec *codec,
enum snd_soc_bias_level level)
{
Expand All @@ -524,7 +506,7 @@ static int wm8804_set_bias_level(struct snd_soc_codec *codec,
ret);
return ret;
}
wm8804_sync_cache(codec);
snd_soc_cache_sync(codec);
}
/* power down the OSC and the PLL */
snd_soc_update_bits(codec, WM8804_PWRDN, 0x9, 0x9);
Expand Down

0 comments on commit e055cd6

Please sign in to comment.