aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/vt_kern.h
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-02-28 09:49:23 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-08 13:50:35 -0500
commit079c9534a96da9a85a2a2f9715851050fbfbf749 (patch)
tree0e3782ff6d341f38c6f0b3840cb3c8f2bc922df8 /include/linux/vt_kern.h
parent0fb8379dab9f97e4c56de8f9ea772c10eda27561 (diff)
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 'include/linux/vt_kern.h')
-rw-r--r--include/linux/vt_kern.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 5d8726ad5729..e33d77f15bda 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -169,5 +169,28 @@ extern void hide_boot_cursor(bool hide);
169 169
170/* keyboard provided interfaces */ 170/* keyboard provided interfaces */
171extern int vt_do_diacrit(unsigned int cmd, void __user *up, int eperm); 171extern int vt_do_diacrit(unsigned int cmd, void __user *up, int eperm);
172extern int vt_do_kdskbmode(int console, unsigned int arg);
173extern int vt_do_kdskbmeta(int console, unsigned int arg);
174extern int vt_do_kbkeycode_ioctl(int cmd, struct kbkeycode __user *user_kbkc,
175 int perm);
176extern int vt_do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe,
177 int perm, int console);
178extern int vt_do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb,
179 int perm);
180extern int vt_do_kdskled(int console, int cmd, unsigned long arg, int perm);
181extern int vt_do_kdgkbmode(int console);
182extern int vt_do_kdgkbmeta(int console);
183extern void vt_reset_unicode(int console);
184extern int vt_get_shift_state(void);
185extern void vt_reset_keyboard(int console);
186extern int vt_get_leds(int console, int flag);
187extern int vt_get_kbd_mode_bit(int console, int bit);
188extern void vt_set_kbd_mode_bit(int console, int bit);
189extern void vt_clr_kbd_mode_bit(int console, int bit);
190extern void vt_set_led_state(int console, int leds);
191extern void vt_set_led_state(int console, int leds);
192extern void vt_kbd_con_start(int console);
193extern void vt_kbd_con_stop(int console);
194
172 195
173#endif /* _VT_KERN_H */ 196#endif /* _VT_KERN_H */