summaryrefslogtreecommitdiff
path: root/drivers/input/input.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-05-03 04:50:52 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-03 04:52:31 -0300
commit30813c792b34132cb7a60f8148520a53df640554 (patch)
tree6c0feb660e9c787d3318c02556ee030a580e44be /drivers/input/input.c
parentcaedfbd6cf0f4cc15f6dcac5cbcde6e74acb6625 (diff)
parentb91ce4d14a21fc04d165be30319541e0f9204f15 (diff)
Merge remote branch 'origin/stable' into tmp
* origin/stable: (506 commits) ipv6: Fix inet6_csk_bind_conflict() e100: Fix the TX workqueue race initramfs: handle unrecognised decompressor when unpacking ksm: check for ERR_PTR from follow_page() VMware Balloon driver fs/block_dev.c: fix performance regression in O_DIRECT|O_SYNC writes to block devices lib/vsprintf.c: add missing EXPORT_SYMBOL(simple_strtoll) w1: fix omap 1-wire driver compilation rmap: anon_vma_prepare() can leak anon_vma_chain keys: fix an RCU warning lib: fix the use of LZO to decompress initramfs images hugetlb: fix infinite loop in get_futex_key() when backed by huge pages w1: w1 temp: fix negative termperature calculation cgroups: fix procs documentation drivers/video/efifb.c: support framebuffer for NVIDIA 9400M in MacBook Pro 5,1 lis3: add support for HP ProBook 432x/442x/452x/522x mtd: fix Orion NAND driver compilation with ARM OABI flex_array: fix the panic when calling flex_array_alloc() without __GFP_ZERO kernel/sys.c: fix compat uname machine reiserfs: fix corruption during shrinking of xattrs ... Conflicts: drivers/input/input.c Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r--drivers/input/input.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index ae29af8e08f8..e623edf6cebe 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -688,7 +688,7 @@ static int input_default_setkeycode(struct input_dev *dev,
}
__clear_bit(old_keycode, dev->keybit);
- __set_bit(keycode, dev->keybit);
+ __set_bit(kt_entry->keycode, dev->keybit);
for (i = 0; i < dev->keycodemax; i++) {
if (input_fetch_keycode(dev, i) == old_keycode) {
@@ -816,6 +816,8 @@ EXPORT_SYMBOL(input_set_keycode_big);
int input_get_keycode(struct input_dev *dev,
unsigned int scancode, unsigned int *keycode)
{
+ unsigned long flags;
+
if (dev->getkeycode) {
/*
* Use the legacy calls
@@ -836,7 +838,9 @@ int input_get_keycode(struct input_dev *dev,
kt_entry.len = 4;
kt_entry.index = scancode;
+ spin_lock_irqsave(&dev->event_lock, flags);
retval = dev->getkeycodebig_from_index(dev, &kt_entry);
+ spin_unlock_irqrestore(&dev->event_lock, flags);
*keycode = kt_entry.keycode;
return retval;