aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8985.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-21 10:36:30 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-21 16:15:41 -0500
commit8b71d441f75d180d3174b2e1b649db385552c266 (patch)
tree60a327f449cc616377266a18d8b9b234472e6f7d /sound/soc/codecs/wm8985.c
parenteb8f7693df0426b3c7aa6e6e401486962a033d5e (diff)
ASoC: wm8985: Use standard cache sync implementation
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8985.c')
-rw-r--r--sound/soc/codecs/wm8985.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c
index ee3aba3098cd..297119ffec68 100644
--- a/sound/soc/codecs/wm8985.c
+++ b/sound/soc/codecs/wm8985.c
@@ -834,25 +834,6 @@ static int wm8985_set_sysclk(struct snd_soc_dai *dai,
834 return 0; 834 return 0;
835} 835}
836 836
837static void wm8985_sync_cache(struct snd_soc_codec *codec)
838{
839 short i;
840 u16 *cache;
841
842 if (!codec->cache_sync)
843 return;
844 codec->cache_only = 0;
845 /* restore cache */
846 cache = codec->reg_cache;
847 for (i = 0; i < codec->driver->reg_cache_size; i++) {
848 if (i == WM8985_SOFTWARE_RESET
849 || cache[i] == wm8985_reg_defs[i])
850 continue;
851 snd_soc_write(codec, i, cache[i]);
852 }
853 codec->cache_sync = 0;
854}
855
856static int wm8985_set_bias_level(struct snd_soc_codec *codec, 837static int wm8985_set_bias_level(struct snd_soc_codec *codec,
857 enum snd_soc_bias_level level) 838 enum snd_soc_bias_level level)
858{ 839{
@@ -879,7 +860,7 @@ static int wm8985_set_bias_level(struct snd_soc_codec *codec,
879 return ret; 860 return ret;
880 } 861 }
881 862
882 wm8985_sync_cache(codec); 863 snd_soc_cache_sync(codec);
883 864
884 /* enable anti-pop features */ 865 /* enable anti-pop features */
885 snd_soc_update_bits(codec, WM8985_OUT4_TO_ADC, 866 snd_soc_update_bits(codec, WM8985_OUT4_TO_ADC,