Skip to content

Commit

Permalink
Input: pxa27x_keypad bug fix for direct_key_mask
Browse files Browse the repository at this point in the history
When direcct_key_num is 0, the mask should be 0.
When direcct_key_num is 1, the mask should be 0b1.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
  • Loading branch information
Chao Xie authored and Haojian Zhuang committed Apr 27, 2012
1 parent 6ce34a5 commit 5545fa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/keyboard/pxa27x_keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ static void pxa27x_keypad_config(struct pxa27x_keypad *keypad)
if (pdata->direct_key_num > direct_key_num)
direct_key_num = pdata->direct_key_num;

keypad->direct_key_mask = ((2 << direct_key_num) - 1) & ~mask;
keypad->direct_key_mask = ((1 << direct_key_num) - 1) & ~mask;

/* enable direct key */
if (direct_key_num)
Expand Down

0 comments on commit 5545fa8

Please sign in to comment.