projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e68fb6
)
Input: gpio_input: Fix keys with keycode 0x100-0x1ff
author
Arve Hjønnevåg
<arve@android.com>
Wed, 15 Jul 2009 03:58:41 +0000
(20:58 -0700)
committer
Colin Cross
<ccross@android.com>
Thu, 30 Sep 2010 00:49:11 +0000
(17:49 -0700)
KEY_MAX is no longer a power of 2.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
drivers/input/misc/gpio_matrix.c
patch
|
blob
|
history
diff --git
a/drivers/input/misc/gpio_matrix.c
b/drivers/input/misc/gpio_matrix.c
index 441cc1ce1ab7624200976c0af2e2d97882777aad..10b441101668a94b95ead237eaecfb5aecc6c902 100644
(file)
--- a/
drivers/input/misc/gpio_matrix.c
+++ b/
drivers/input/misc/gpio_matrix.c
@@
-316,9
+316,8
@@
int gpio_event_matrix_func(struct input_dev *input_dev,
kp->keypad_info = mi;
set_bit(EV_KEY, input_dev->evbit);
for (i = 0; i < key_count; i++) {
- if (mi->keymap[i])
- set_bit(mi->keymap[i] & KEY_MAX,
- input_dev->keybit);
+ if (mi->keymap[i] && mi->keymap[i] <= KEY_MAX)
+ set_bit(mi->keymap[i], input_dev->keybit);
}
for (i = 0; i < mi->noutputs; i++) {