summaryrefslogtreecommitdiffstats
path: root/drivers/input/input.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-04-15 11:49:55 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-15 11:49:55 -0700
commit00eef7bd01c7598d195699983c5290d901df19ad (patch)
tree14ba0178fc2c5e807282132e689236965b889e91 /drivers/input/input.c
parent250541fca717a5c9b0d3710e737b2ca32ebb6fbc (diff)
parent014f61504af276ba9d9544d8a7401d8f8526eb73 (diff)
downloadop-kernel-dev-00eef7bd01c7598d195699983c5290d901df19ad.zip
op-kernel-dev-00eef7bd01c7598d195699983c5290d901df19ad.tar.gz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: wacom - switch mode upon system resume Revert "Input: wacom - merge out and in prox events" Input: matrix_keypad - allow platform to disable key autorepeat Input: ALPS - add signature for HP Pavilion dm3 laptops Input: i8042 - spelling fix Input: sparse-keymap - implement safer freeing of the keymap Input: update the status of the Multitouch X driver project Input: clarify the no-finger event in multitouch protocol Input: bcm5974 - retract efi-broken suspend_resume Input: sparse-keymap - free the right keymap on error
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r--drivers/input/input.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index afd4e2b..9c79bd5 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -660,7 +660,14 @@ static int input_default_setkeycode(struct input_dev *dev,
int input_get_keycode(struct input_dev *dev,
unsigned int scancode, unsigned int *keycode)
{
- return dev->getkeycode(dev, scancode, keycode);
+ unsigned long flags;
+ int retval;
+
+ spin_lock_irqsave(&dev->event_lock, flags);
+ retval = dev->getkeycode(dev, scancode, keycode);
+ spin_unlock_irqrestore(&dev->event_lock, flags);
+
+ return retval;
}
EXPORT_SYMBOL(input_get_keycode);
OpenPOWER on IntegriCloud