]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Input: pxa27x_keypad bug fix for direct_key_mask
authorChao Xie <chao.xie@marvell.com>
Sun, 1 Apr 2012 02:08:02 +0000 (10:08 +0800)
committerHaojian Zhuang <haojian.zhuang@gmail.com>
Fri, 27 Apr 2012 08:48:33 +0000 (16:48 +0800)
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>
drivers/input/keyboard/pxa27x_keypad.c

index b07771e8306346237f5d2c1977321f7ff41fb893..5d717202aad8121a567cddbaabac67b14f8fc107 100644 (file)
@@ -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)