aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/tc3589x-keypad.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/keyboard/tc3589x-keypad.c')
-rw-r--r--drivers/input/keyboard/tc3589x-keypad.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/input/keyboard/tc3589x-keypad.c b/drivers/input/keyboard/tc3589x-keypad.c
index f4da2a7a697..7d498e69850 100644
--- a/drivers/input/keyboard/tc3589x-keypad.c
+++ b/drivers/input/keyboard/tc3589x-keypad.c
@@ -78,7 +78,7 @@
78 * @input: pointer to input device object 78 * @input: pointer to input device object
79 * @board: keypad platform device 79 * @board: keypad platform device
80 * @krow: number of rows 80 * @krow: number of rows
81 * @kcol: number of coloumns 81 * @kcol: number of columns
82 * @keymap: matrix scan code table for keycodes 82 * @keymap: matrix scan code table for keycodes
83 * @keypad_stopped: holds keypad status 83 * @keypad_stopped: holds keypad status
84 */ 84 */
@@ -333,23 +333,22 @@ static int __devinit tc3589x_keypad_probe(struct platform_device *pdev)
333 input->name = pdev->name; 333 input->name = pdev->name;
334 input->dev.parent = &pdev->dev; 334 input->dev.parent = &pdev->dev;
335 335
336 input->keycode = keypad->keymap;
337 input->keycodesize = sizeof(keypad->keymap[0]);
338 input->keycodemax = ARRAY_SIZE(keypad->keymap);
339
340 input->open = tc3589x_keypad_open; 336 input->open = tc3589x_keypad_open;
341 input->close = tc3589x_keypad_close; 337 input->close = tc3589x_keypad_close;
342 338
343 input_set_drvdata(input, keypad); 339 error = matrix_keypad_build_keymap(plat->keymap_data, NULL,
340 TC3589x_MAX_KPROW, TC3589x_MAX_KPCOL,
341 keypad->keymap, input);
342 if (error) {
343 dev_err(&pdev->dev, "Failed to build keymap\n");
344 goto err_free_mem;
345 }
344 346
345 input_set_capability(input, EV_MSC, MSC_SCAN); 347 input_set_capability(input, EV_MSC, MSC_SCAN);
346
347 __set_bit(EV_KEY, input->evbit);
348 if (!plat->no_autorepeat) 348 if (!plat->no_autorepeat)
349 __set_bit(EV_REP, input->evbit); 349 __set_bit(EV_REP, input->evbit);
350 350
351 matrix_keypad_build_keymap(plat->keymap_data, 0x3, 351 input_set_drvdata(input, keypad);
352 input->keycode, input->keybit);
353 352
354 error = request_threaded_irq(irq, NULL, 353 error = request_threaded_irq(irq, NULL,
355 tc3589x_keypad_irq, plat->irqtype, 354 tc3589x_keypad_irq, plat->irqtype,