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:
Mark Brown
2010-12-24 16:59:30 +00:00
szülő 203db22071
commit a1b3b5eeee
7 fájl változott, egészen pontosan 100 új sor hozzáadva és 58 régi sor törölve

Fájl megtekintése

@@ -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);