From e0624c929bcc6d1b3551ff39f5c51c8ab1101837 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Sat, 9 Jun 2012 11:27:17 +0800 Subject: [PATCH] --- yaml --- r: 311083 b: refs/heads/master c: c1b88ee2bbb82c56ac24c70850004de9a43915d5 h: refs/heads/master i: 311081: 9d4ee265e5dd00bc0581feeaaefeec1495289764 311079: 96fbf35e40a18b196465b2d62c63cd745d4eace7 v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/wm8904.c | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 601dc5cd6e81..454bb55af05e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 433897f7408b556f7dfbb98c94deea02e634d2a7 +refs/heads/master: c1b88ee2bbb82c56ac24c70850004de9a43915d5 diff --git a/trunk/sound/soc/codecs/wm8904.c b/trunk/sound/soc/codecs/wm8904.c index 4e190b5950ba..812acd83fb48 100644 --- a/trunk/sound/soc/codecs/wm8904.c +++ b/trunk/sound/soc/codecs/wm8904.c @@ -1863,6 +1863,7 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec, return ret; } + regcache_cache_only(wm8904->regmap, false); regcache_sync(wm8904->regmap); /* Enable bias */ @@ -1899,14 +1900,8 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec, snd_soc_update_bits(codec, WM8904_BIAS_CONTROL_0, WM8904_BIAS_ENA, 0); -#ifdef CONFIG_REGULATOR - /* Post 2.6.34 we will be able to get a callback when - * the regulators are disabled which we can use but - * for now just assume that the power will be cut if - * the regulator API is in use. - */ - codec->cache_sync = 1; -#endif + regcache_cache_only(wm8904->regmap, true); + regcache_mark_dirty(wm8904->regmap); regulator_bulk_disable(ARRAY_SIZE(wm8904->supplies), wm8904->supplies); @@ -2086,7 +2081,6 @@ static int wm8904_probe(struct snd_soc_codec *codec) struct wm8904_pdata *pdata = wm8904->pdata; int ret, i; - codec->cache_sync = 1; codec->control_data = wm8904->regmap; switch (wm8904->devtype) { @@ -2149,6 +2143,7 @@ static int wm8904_probe(struct snd_soc_codec *codec) goto err_enable; } + regcache_cache_only(wm8904->regmap, true); /* Change some default settings - latch VU and enable ZC */ snd_soc_update_bits(codec, WM8904_ADC_DIGITAL_VOLUME_LEFT, WM8904_ADC_VU, WM8904_ADC_VU);