diff options
author | Chao Xie <chao.xie@marvell.com> | 2012-03-31 22:08:02 -0400 |
---|---|---|
committer | Haojian Zhuang <haojian.zhuang@gmail.com> | 2012-04-27 04:48:33 -0400 |
commit | 5545fa897a0a1a34249e98ea4244b256cbe58df3 (patch) | |
tree | 40d5e5f83d7fc5ae447388468b161fedd0616123 /drivers/input | |
parent | 6ce34a5fb4955fac1eebe080e1c2784bc8710449 (diff) |
Input: pxa27x_keypad bug fix for direct_key_mask
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>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | 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 b07771e83063..5d717202aad8 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) | |||
383 | if (pdata->direct_key_num > direct_key_num) | 383 | if (pdata->direct_key_num > direct_key_num) |
384 | direct_key_num = pdata->direct_key_num; | 384 | direct_key_num = pdata->direct_key_num; |
385 | 385 | ||
386 | keypad->direct_key_mask = ((2 << direct_key_num) - 1) & ~mask; | 386 | keypad->direct_key_mask = ((1 << direct_key_num) - 1) & ~mask; |
387 | 387 | ||
388 | /* enable direct key */ | 388 | /* enable direct key */ |
389 | if (direct_key_num) | 389 | if (direct_key_num) |