aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-11-09 12:56:01 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-12 09:43:51 +0100
commitcb215da8369cbbbe3b6260b2ca43518f884ddc6b (patch)
tree50d8233cd24cc82edcc0940f726fc171e511a71f /drivers/tty
parentvt: keyboard, replace numbers with \r, \n where appropriate (diff)
downloadlinux-dev-cb215da8369cbbbe3b6260b2ca43518f884ddc6b.tar.xz
linux-dev-cb215da8369cbbbe3b6260b2ca43518f884ddc6b.zip
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>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/vt/keyboard.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index 872791551c77..52922d21a49f 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -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) ||