vt: keyboard, make use of assign_bit() API
We have for some time the assign_bit() API to replace open coded if (foo) set_bit(n, bar); else clear_bit(n, bar); Use this API in VT keyboard library code. Acked-by: Jiri Slaby <jirislaby@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20201109105601.47159-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6d2c52a83b
commit
cb215da836
|
@ -1433,10 +1433,7 @@ static void kbd_keycode(unsigned int keycode, int down, bool hw_raw)
|
|||
raw_mode = true;
|
||||
}
|
||||
|
||||
if (down)
|
||||
set_bit(keycode, key_down);
|
||||
else
|
||||
clear_bit(keycode, key_down);
|
||||
assign_bit(keycode, key_down, down);
|
||||
|
||||
if (rep &&
|
||||
(!vc_kbd_mode(kbd, VC_REPEAT) ||
|
||||
|
|
Loading…
Reference in New Issue