Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andy Shevchenko and committed by
Greg Kroah-Hartman
cb215da8 6d2c52a8

+1 -4
+1 -4
drivers/tty/vt/keyboard.c
··· 1433 1433 raw_mode = true; 1434 1434 } 1435 1435 1436 - if (down) 1437 - set_bit(keycode, key_down); 1438 - else 1439 - clear_bit(keycode, key_down); 1436 + assign_bit(keycode, key_down, down); 1440 1437 1441 1438 if (rep && 1442 1439 (!vc_kbd_mode(kbd, VC_REPEAT) ||