Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 01d8ee5d authored by Will Deacon's avatar Will Deacon Committed by Swetha Chikkaboraiah
Browse files

ANDROID: usb: f_accessory: Avoid bitfields for shared variables



Using bitfields for shared variables is a "bad idea", as they require
a non-atomic read-modify-write to be generated by the compiler, which can
cause updates to unrelated bits in the same word to disappear.

Ensure the 'online' and 'disconnected' members of 'struct acc_dev' are
placed in separate variables by declaring them each as 'int'.

Bug: 173789633
Signed-off-by: default avatarWill Deacon <willdeacon@google.com>
Change-Id: Ia6031d82a764e83b2cc3502fbe5fb273511da752
Signed-off-by: default avatarGiuliano Procida <gprocida@google.com>
Git-Commit: 429fec28
Git-Repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git


Signed-off-by: default avatarSwetha Chikkaboraiah <quic_schikk@quicinc.com>
parent ba55275e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment