projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51b3b5c
)
ASoC: Enforce the mask in snd_soc_update_bits()
author
Mark Brown
<broonie@opensource.wolfsonmicro.com>
Fri, 3 Jun 2011 16:09:14 +0000
(17:09 +0100)
committer
Mark Brown
<broonie@opensource.wolfsonmicro.com>
Mon, 6 Jun 2011 11:48:42 +0000
(12:48 +0100)
Avoids issues if someone does a read followed by restore and doesn't mask
out only the bits being updated.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
sound/soc/soc-core.c
patch
|
blob
|
history
diff --git
a/sound/soc/soc-core.c
b/sound/soc/soc-core.c
index 13a40fc78d32ae7b21817a91f72f99dbf5ba443e..c53f5d5895915b7647479379988f7062730a1ad9 100644
(file)
--- a/
sound/soc/soc-core.c
+++ b/
sound/soc/soc-core.c
@@
-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);