提交 78bf3c9a 编写于 作者: M Mark Brown

ASoC: Enforce the mask in snd_soc_update_bits()

Avoids issues if someone does a read followed by restore and doesn't mask
out only the bits being updated.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: NLiam Girdwood <lrg@ti.com>
上级 51b3b5ca
......@@ -2323,7 +2323,7 @@ int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg,
return ret;
old = ret;
new = (old & ~mask) | value;
new = (old & ~mask) | (value & mask);
change = old != new;
if (change) {
ret = snd_soc_write(codec, reg, new);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册