diff options
| author | Peng Fan <peng.fan@nxp.com> | 2026-09-19 21:07:36 +0800 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-09-21 15:54:00 -0700 |
| commit | 16e10569b30cba05dde89608033e9a6ac2f08bb1 (patch) | |
| tree | 7fd41be0821f271e427d022fa9cfc97c3ee6cb30 /drivers/input/keyboard | |
| parent | b331b6d23cb7f0a957d89a4a1a9bf3f041784d94 (diff) | |
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>
Diffstat (limited to 'drivers/input/keyboard')
| -rw-r--r-- | drivers/input/keyboard/atkbd.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 3509b58e6492..c34ae215d000 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c @@ -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; } } |
