summaryrefslogtreecommitdiff
path: root/drivers/char/keyboard.c
diff options
context:
space:
mode:
authorKarl Dahlke <eklhad@comcast.net>2008-04-15 01:30:32 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-04-15 01:30:32 -0400
commit0beb4f6f294b0f2dde07fa9da9c00abd4f9c8b50 (patch)
tree2b1b330a3b836e99ca5be38a5c2923dd319c8936 /drivers/char/keyboard.c
parent76d057ce5a48034c97f604a0a25a87093e072c71 (diff)
Input: put ledstate in the keyboard notifier
Led state should be part of the key event, like shiftstate, and not grabbed asynchronously after the fact. [samuel.thibault@ens-lyon.org: various fixes] Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/char/keyboard.c')
-rw-r--r--drivers/char/keyboard.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
index 4dbd3425e928..59608e341385 100644
--- a/drivers/char/keyboard.c
+++ b/drivers/char/keyboard.c
@@ -1237,6 +1237,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
}
param.shift = shift_final = (shift_state | kbd->slockstate) ^ kbd->lockstate;
+ param.ledstate = kbd->ledflagstate;
key_map = key_maps[shift_final];
if (atomic_notifier_call_chain(&keyboard_notifier_list, KBD_KEYCODE, &param) == NOTIFY_STOP || !key_map) {
@@ -1285,6 +1286,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
(*k_handler[type])(vc, keysym & 0xff, !down);
+ param.ledstate = kbd->ledflagstate;
atomic_notifier_call_chain(&keyboard_notifier_list, KBD_POST_KEYSYM, &param);
if (type != KT_SLOCK)