summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2007-11-04 05:41:12 +0100
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-01-21 07:11:06 +0100
commitf4f37c8ec7d2491c8885c890ba74254b9adfbeee (patch)
treeecd4cb10af7fd7aa4fb02fe2a106608e9d64c3fe /drivers/char
parentInput: atkbd - properly handle special keys on Dell Latitudes (diff)
downloadlinux-f4f37c8ec7d2491c8885c890ba74254b9adfbeee.tar.xz
linux-f4f37c8ec7d2491c8885c890ba74254b9adfbeee.zip
Input: Add proper locking when changing device's keymap
Take dev->event_lock to make sure that we don't race with input_event() and also force key up event when removing a key from keymap table. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/keyboard.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
index fc54d234507a..5218d0d0511e 100644
--- a/drivers/char/keyboard.c
+++ b/drivers/char/keyboard.c
@@ -194,7 +194,7 @@ int getkeycode(unsigned int scancode)
int error = -ENODEV;
list_for_each_entry(handle, &kbd_handler.h_list, h_node) {
- error = handle->dev->getkeycode(handle->dev, scancode, &keycode);
+ error = input_get_keycode(handle->dev, scancode, &keycode);
if (!error)
return keycode;
}
@@ -208,7 +208,7 @@ int setkeycode(unsigned int scancode, unsigned int keycode)
int error = -ENODEV;
list_for_each_entry(handle, &kbd_handler.h_list, h_node) {
- error = handle->dev->setkeycode(handle->dev, scancode, keycode);
+ error = input_set_keycode(handle->dev, scancode, keycode);
if (!error)
break;
}