OSDN Git Service

vt: keyboard, extract vt_kdgkbent and vt_kdskbent
authorJiri Slaby <jslaby@suse.cz>
Thu, 29 Oct 2020 11:32:11 +0000 (12:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Nov 2020 15:43:38 +0000 (16:43 +0100)
commitfe6416e126cc17c0454c9c32d06b81a4e58ed8b7
tree0ee04a96a3859ce1cd261264f0922087e9f7c96e
parente27979dace0438fabc0a8e882356d20f532eb1e3
vt: keyboard, extract vt_kdgkbent and vt_kdskbent

Split vt_do_kdsk_ioctl into three functions:
* getter (KDGKBENT/vt_kdgkbent)
* setter (KDSKBENT/vt_kdskbent)
* switch-case helper (vt_do_kdsk_ioctl)

This eliminates the need of ugly one-letter macros as we use parameters
now:
* i aka tmp.kb_index -> idx
* s aka tmp.kb_table -> map
* v aka tmp.kb_value -> val

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20201029113222.32640-6-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/keyboard.c