Skip to content

Commit

Permalink
Input: matrix-keymap - fix building keymaps
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Torokhov committed May 24, 2012
1 parent 6123f11 commit 8680917
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/matrix-keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8680917

Please sign in to comment.