summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8523.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-24 16:59:30 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-01-17 13:59:39 +0000
commita1b3b5eeeebac8acfa7838ef90f5a00a6f9188a0 (patch)
tree494c5f242fe497729c0b57929319305f2a3ebc29 /sound/soc/codecs/wm8523.c
parent203db220718c735dcb959fddc64e94fff3b52f73 (diff)
downloadop-kernel-dev-a1b3b5eeeebac8acfa7838ef90f5a00a6f9188a0.zip
op-kernel-dev-a1b3b5eeeebac8acfa7838ef90f5a00a6f9188a0.tar.gz
ASoC: Avoid direct register cache access when setting defaults
Directly accessing the register cache means that we can't use anything except a flat register cache so use snd_soc_update_bits(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/codecs/wm8523.c')
-rw-r--r--sound/soc/codecs/wm8523.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c
index 83e86f0..4fd4d8d 100644
--- a/sound/soc/codecs/wm8523.c
+++ b/sound/soc/codecs/wm8523.c
@@ -414,7 +414,6 @@ static int wm8523_resume(struct snd_soc_codec *codec)
static int wm8523_probe(struct snd_soc_codec *codec)
{
struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec);
- u16 *reg_cache = codec->reg_cache;
int ret, i;
codec->hw_write = (hw_write_t)i2c_master_send;
@@ -471,8 +470,9 @@ static int wm8523_probe(struct snd_soc_codec *codec)
}
/* Change some default settings - latch VU and enable ZC */
- reg_cache[WM8523_DAC_GAINR] |= WM8523_DACR_VU;
- reg_cache[WM8523_DAC_CTRL3] |= WM8523_ZC;
+ snd_soc_update_bits(codec, WM8523_DAC_GAINR,
+ WM8523_DACR_VU, WM8523_DACR_VU);
+ snd_soc_update_bits(codec, WM8523_DAC_CTRL3, WM8523_ZC, WM8523_ZC);
wm8523_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
OpenPOWER on IntegriCloud