]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Input: matrix-keymap - fix building keymaps
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 24 May 2012 08:10:20 +0000 (01:10 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 24 May 2012 08:12:20 +0000 (01:12 -0700)
Keymaps used by drivers based on matrix-keymap facilities are arrays of
unsigned shorts, not chars. Treating them otherwise produces corrupted
keymaps.

Reported-by: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/matrix-keymap.c

index db92c1ebfc59e51a53cbd919228d218a4a535bee..443ad64b7f2a2344ff6e8801dfe2c7f0a1e0a0a1 100644 (file)
@@ -29,7 +29,7 @@ static bool matrix_keypad_map_key(struct input_dev *input_dev,
                                  unsigned int rows, unsigned int cols,
                                  unsigned int row_shift, unsigned int key)
 {
-       unsigned char *keymap = input_dev->keycode;
+       unsigned short *keymap = input_dev->keycode;
        unsigned int row = KEY_ROW(key);
        unsigned int col = KEY_COL(key);
        unsigned short code = KEY_VAL(key);