aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8978.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-24 11:59:30 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-01-17 08:59:39 -0500
commita1b3b5eeeebac8acfa7838ef90f5a00a6f9188a0 (patch)
tree494c5f242fe497729c0b57929319305f2a3ebc29 /sound/soc/codecs/wm8978.c
parent203db220718c735dcb959fddc64e94fff3b52f73 (diff)
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/wm8978.c')
-rw-r--r--sound/soc/codecs/wm8978.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8978.c b/sound/soc/codecs/wm8978.c
index 4bbc3442703f..30fb48ec2799 100644
--- a/sound/soc/codecs/wm8978.c
+++ b/sound/soc/codecs/wm8978.c
@@ -965,7 +965,7 @@ static int wm8978_probe(struct snd_soc_codec *codec)
965 * written. 965 * written.
966 */ 966 */
967 for (i = 0; i < ARRAY_SIZE(update_reg); i++) 967 for (i = 0; i < ARRAY_SIZE(update_reg); i++)
968 ((u16 *)codec->reg_cache)[update_reg[i]] |= 0x100; 968 snd_soc_update_bits(codec, update_reg[i], 0x100, 0x100);
969 969
970 /* Reset the codec */ 970 /* Reset the codec */
971 ret = snd_soc_write(codec, WM8978_RESET, 0); 971 ret = snd_soc_write(codec, WM8978_RESET, 0);