lkml.org 
[lkml]   [2008]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: input: put ledstate in the keyboard notifier
Oh, I just noticed that Karl Dahlke's patch to provide the ledstate got
into -mm. Unfortunately, it is a bit bogus, see patch below, to be
applied on top of Karl's one.

Samuel


Keyboard notification ledstate fixes.

In keyboard notifications, use kbd->ledflagstate instead of
getledstate() since that's what the keyboard layer is supposed to use.

Update param.ledstate again between key handler call and notifying
KBD_POST_KEYSYM, since key handlers may update the led state.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

--- linux/drivers/char/keyboard.c.orig 2008-02-23 15:14:29.000000000 +0100
+++ linux/drivers/char/keyboard.c 2008-02-23 15:20:25.000000000 +0100
@@ -1240,7 +1240,7 @@
}

param.shift = shift_final = (shift_state | kbd->slockstate) ^ kbd->lockstate;
- param.ledstate = getledstate();
+ 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) {
@@ -1289,6 +1289,7 @@

(*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)

\
 
 \ /
  Last update: 2008-02-23 15:29    [W:0.037 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site