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>
This commit is contained in:
@@ -965,7 +965,7 @@ static int wm8978_probe(struct snd_soc_codec *codec)
|
||||
* written.
|
||||
*/
|
||||
for (i = 0; i < ARRAY_SIZE(update_reg); i++)
|
||||
((u16 *)codec->reg_cache)[update_reg[i]] |= 0x100;
|
||||
snd_soc_update_bits(codec, update_reg[i], 0x100, 0x100);
|
||||
|
||||
/* Reset the codec */
|
||||
ret = snd_soc_write(codec, WM8978_RESET, 0);
|
||||
|
Reference in New Issue
Block a user