From f4f37c8ec7d2491c8885c890ba74254b9adfbeee Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Sun, 4 Nov 2007 00:41:12 -0400 Subject: 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 --- include/linux/input.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/input.h') diff --git a/include/linux/input.h b/include/linux/input.h index 2075d6da2a3..9a963fe9730 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -1309,6 +1309,9 @@ static inline void input_set_abs_params(struct input_dev *dev, int axis, int min dev->absbit[BIT_WORD(axis)] |= BIT_MASK(axis); } +int input_get_keycode(struct input_dev *dev, int scancode, int *keycode); +int input_set_keycode(struct input_dev *dev, int scancode, int keycode); + extern struct class input_class; /** -- cgit v1.2.3 From 0c1efd365306c9b04df5abdd41e9b4dc721e84fb Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Mon, 21 Jan 2008 01:08:24 -0500 Subject: Input: remove cdev from input_dev structure Cdev field was obsolete and provided only for backward compatibility since conversion of input core from class devices to regular devices. It is time to remove it. Signed-off-by: Dmitry Torokhov --- include/linux/input.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include/linux/input.h') diff --git a/include/linux/input.h b/include/linux/input.h index 9a963fe9730..48937ffa977 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -1018,7 +1018,6 @@ struct ff_effect { * @going_away: marks devices that are in a middle of unregistering and * causes input_open_device*() fail with -ENODEV. * @dev: driver model's view of this device - * @cdev: union for struct device pointer * @h_list: list of input handles associated with the device. When * accessing the list dev->mutex must be held * @node: used to place the device onto input_dev_list @@ -1083,9 +1082,6 @@ struct input_dev { int going_away; struct device dev; - union { /* temporarily so while we switching to struct device */ - struct device *dev; - } cdev; struct list_head h_list; struct list_head node; -- cgit v1.2.3