diff options
Diffstat (limited to 'drivers/input/keyboard/stmpe-keypad.c')
-rw-r--r-- | drivers/input/keyboard/stmpe-keypad.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/input/keyboard/stmpe-keypad.c b/drivers/input/keyboard/stmpe-keypad.c index 9397cf9c625c..470a8778dec1 100644 --- a/drivers/input/keyboard/stmpe-keypad.c +++ b/drivers/input/keyboard/stmpe-keypad.c | |||
@@ -289,19 +289,17 @@ static int __devinit stmpe_keypad_probe(struct platform_device *pdev) | |||
289 | input->id.bustype = BUS_I2C; | 289 | input->id.bustype = BUS_I2C; |
290 | input->dev.parent = &pdev->dev; | 290 | input->dev.parent = &pdev->dev; |
291 | 291 | ||
292 | input_set_capability(input, EV_MSC, MSC_SCAN); | 292 | ret = matrix_keypad_build_keymap(plat->keymap_data, NULL, |
293 | STMPE_KEYPAD_MAX_ROWS, | ||
294 | STMPE_KEYPAD_MAX_COLS, | ||
295 | keypad->keymap, input); | ||
296 | if (ret) | ||
297 | goto out_freeinput; | ||
293 | 298 | ||
294 | __set_bit(EV_KEY, input->evbit); | 299 | input_set_capability(input, EV_MSC, MSC_SCAN); |
295 | if (!plat->no_autorepeat) | 300 | if (!plat->no_autorepeat) |
296 | __set_bit(EV_REP, input->evbit); | 301 | __set_bit(EV_REP, input->evbit); |
297 | 302 | ||
298 | input->keycode = keypad->keymap; | ||
299 | input->keycodesize = sizeof(keypad->keymap[0]); | ||
300 | input->keycodemax = ARRAY_SIZE(keypad->keymap); | ||
301 | |||
302 | matrix_keypad_build_keymap(plat->keymap_data, STMPE_KEYPAD_ROW_SHIFT, | ||
303 | input->keycode, input->keybit); | ||
304 | |||
305 | for (i = 0; i < plat->keymap_data->keymap_size; i++) { | 303 | for (i = 0; i < plat->keymap_data->keymap_size; i++) { |
306 | unsigned int key = plat->keymap_data->keymap[i]; | 304 | unsigned int key = plat->keymap_data->keymap[i]; |
307 | 305 | ||