diff options
author | Andrew Liu <andrew.liu200917@gmail.com> | 2013-11-23 19:06:36 +0100 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-11-26 03:26:17 +0100 |
commit | e4cfb034e89a1c7148f617735d92a3655d27773f (patch) | |
tree | 5fcd037bdae5695fa786ea691e671c57bb15f67b /drivers/input/keyboard/bf54x-keys.c | |
parent | Merge branch 'next' into for-linus (diff) | |
download | linux-e4cfb034e89a1c7148f617735d92a3655d27773f.tar.xz linux-e4cfb034e89a1c7148f617735d92a3655d27773f.zip |
Input: keyboard - "keycode & KEY_MAX" changes some keycode values
For exmaple, keycode: KEY_OK(0x160) is changed by "and" operation with
KEY_MAX(0x2ff) to KEY_KPENTER(96).
Signed-off-by: Andrew Liu <andrew.liu200917@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/keyboard/bf54x-keys.c')
-rw-r--r-- | drivers/input/keyboard/bf54x-keys.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/keyboard/bf54x-keys.c b/drivers/input/keyboard/bf54x-keys.c index fc88fb48d70d..09b91d093087 100644 --- a/drivers/input/keyboard/bf54x-keys.c +++ b/drivers/input/keyboard/bf54x-keys.c @@ -289,7 +289,8 @@ static int bfin_kpad_probe(struct platform_device *pdev) __set_bit(EV_REP, input->evbit); for (i = 0; i < input->keycodemax; i++) - __set_bit(bf54x_kpad->keycode[i] & KEY_MAX, input->keybit); + if (bf54x_kpad->keycode[i] <= KEY_MAX) + __set_bit(bf54x_kpad->keycode[i], input->keybit); __clear_bit(KEY_RESERVED, input->keybit); error = input_register_device(input); |