summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm8985.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-21 15:39:34 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-21 21:15:41 +0000
commit9f8cbae4163ab132cd7a56385341efdd41fcd429 (patch)
treec525c10d575ef2a91055ea952ead9abff5dc4aaa /sound/soc/codecs/wm8985.c
parent8b71d441f75d180d3174b2e1b649db385552c266 (diff)
downloadkernel-common-9f8cbae4163ab132cd7a56385341efdd41fcd429.tar.gz
kernel-common-9f8cbae4163ab132cd7a56385341efdd41fcd429.tar.bz2
kernel-common-9f8cbae4163ab132cd7a56385341efdd41fcd429.zip
ASoC: wm8985 Don't directly reference the cache data structure
In preparation for conversion to regmap. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8985.c')
-rw-r--r--sound/soc/codecs/wm8985.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c
index 297119ffec68..bbe19b2ae516 100644
--- a/sound/soc/codecs/wm8985.c
+++ b/sound/soc/codecs/wm8985.c
@@ -946,7 +946,6 @@ static int wm8985_probe(struct snd_soc_codec *codec)
size_t i;
struct wm8985_priv *wm8985;
int ret;
- u16 *cache;
wm8985 = snd_soc_codec_get_drvdata(codec);
@@ -979,13 +978,13 @@ static int wm8985_probe(struct snd_soc_codec *codec)
goto err_reg_enable;
}
- cache = codec->reg_cache;
/* latch volume update bits */
for (i = 0; i < ARRAY_SIZE(volume_update_regs); ++i)
- cache[volume_update_regs[i]] |= 0x100;
+ snd_soc_update_bits(codec, volume_update_regs[i],
+ 0x100, 0x100);
/* enable BIASCUT */
- cache[WM8985_BIAS_CTRL] |= WM8985_BIASCUT;
- codec->cache_sync = 1;
+ snd_soc_update_bits(codec, WM8985_BIAS_CTRL, WM8985_BIASCUT,
+ WM8985_BIASCUT);
wm8985_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;