diff options
author | Alan Cox <alan@linux.intel.com> | 2012-02-28 15:49:23 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-08 19:50:35 +0100 |
commit | 079c9534a96da9a85a2a2f9715851050fbfbf749 (patch) | |
tree | 0e3782ff6d341f38c6f0b3840cb3c8f2bc922df8 /drivers/tty/sysrq.c | |
parent | tty: delete briq_panel.c driver (diff) | |
download | linux-079c9534a96da9a85a2a2f9715851050fbfbf749.tar.xz linux-079c9534a96da9a85a2a2f9715851050fbfbf749.zip |
vt:tackle kbd_table
Keyboard struct lifetime is easy, but the locking is not and is completely
ignored by the existing code. Tackle this one head on
- Make the kbd_table private so we can run down all direct users
- Hoick the relevant ioctl handlers into the keyboard layer
- Lock them with the keyboard lock so they don't change mid keypress
- Add helpers for things like console stop/start so we isolate the poking
around properly
- Tweak the braille console so it still builds
There are a couple of FIXME locking cases left for ioctls that are so hideous
they should be addressed in a later patch. After this patch the kbd_table is
private and all the keyboard jiggery pokery is in one place.
This update fixes speakup and also a memory leak in the original.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/sysrq.c')
-rw-r--r-- | drivers/tty/sysrq.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 8db9125133b8..ecb8e2203ac8 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -110,11 +110,9 @@ static struct sysrq_key_op sysrq_SAK_op = { #ifdef CONFIG_VT static void sysrq_handle_unraw(int key) { - struct kbd_struct *kbd = &kbd_table[fg_console]; - - if (kbd) - kbd->kbdmode = default_utf8 ? VC_UNICODE : VC_XLATE; + vt_reset_unicode(fg_console); } + static struct sysrq_key_op sysrq_unraw_op = { .handler = sysrq_handle_unraw, .help_msg = "unRaw", |