[PATCH V2 2/4] Input: pxa27x_keypad bug fix for direct_key_mask
Chao Xie
chao.xie at marvell.com
Thu Mar 29 21:58:16 EDT 2012
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 at marvell.com>
---
drivers/input/keyboard/pxa27x_keypad.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c
index 1c5752f..f9a76d4 100644
--- a/drivers/input/keyboard/pxa27x_keypad.c
+++ b/drivers/input/keyboard/pxa27x_keypad.c
@@ -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)
--
1.7.0.4
More information about the linux-arm-kernel
mailing list