mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
Input: atkbd - use __assign_bit() where applicable
Convert open-coded if/else with __set_bit/__clear_bit to the __assign_bit API. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20260919130741.3041442-1-peng.fan@oss.nxp.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
b331b6d23c
commit
16e10569b3
|
|
@ -357,10 +357,7 @@ static void atkbd_calculate_xl_bit(struct atkbd *atkbd, u8 code)
|
|||
|
||||
for (i = 0; i < ARRAY_SIZE(xl_table); i++) {
|
||||
if (!((code ^ xl_table[i]) & 0x7f)) {
|
||||
if (code & 0x80)
|
||||
__clear_bit(i, &atkbd->xl_bit);
|
||||
else
|
||||
__set_bit(i, &atkbd->xl_bit);
|
||||
__assign_bit(i, &atkbd->xl_bit, !(code & 0x80));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user