diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-05-11 01:37:08 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-05-11 01:38:47 -0400 |
commit | 1932811f426fee71b7ece67e70aeba7e1b0ebb6d (patch) | |
tree | ffc4598961733707a89e711b4614c8cc14446ad5 /drivers/input/keyboard/pmic8xxx-keypad.c | |
parent | d0a3457d38adbad37e43ffe6b763360b2bfe71d9 (diff) |
Input: matrix-keymap - uninline and prepare for device tree support
Change matrix-keymap helper to be out-of-line, like sparse keymap,
allow the helper perform basic keymap validation and return errors,
and prepare for device tree support.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard/pmic8xxx-keypad.c')
-rw-r--r-- | drivers/input/keyboard/pmic8xxx-keypad.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/input/keyboard/pmic8xxx-keypad.c b/drivers/input/keyboard/pmic8xxx-keypad.c index 01a1c9f8a383..52c34657d301 100644 --- a/drivers/input/keyboard/pmic8xxx-keypad.c +++ b/drivers/input/keyboard/pmic8xxx-keypad.c | |||
@@ -626,21 +626,21 @@ static int __devinit pmic8xxx_kp_probe(struct platform_device *pdev) | |||
626 | kp->input->id.product = 0x0001; | 626 | kp->input->id.product = 0x0001; |
627 | kp->input->id.vendor = 0x0001; | 627 | kp->input->id.vendor = 0x0001; |
628 | 628 | ||
629 | kp->input->evbit[0] = BIT_MASK(EV_KEY); | ||
630 | |||
631 | if (pdata->rep) | ||
632 | __set_bit(EV_REP, kp->input->evbit); | ||
633 | |||
634 | kp->input->keycode = kp->keycodes; | ||
635 | kp->input->keycodemax = PM8XXX_MATRIX_MAX_SIZE; | ||
636 | kp->input->keycodesize = sizeof(kp->keycodes); | ||
637 | kp->input->open = pmic8xxx_kp_open; | 629 | kp->input->open = pmic8xxx_kp_open; |
638 | kp->input->close = pmic8xxx_kp_close; | 630 | kp->input->close = pmic8xxx_kp_close; |
639 | 631 | ||
640 | matrix_keypad_build_keymap(keymap_data, PM8XXX_ROW_SHIFT, | 632 | rc = matrix_keypad_build_keymap(keymap_data, NULL, |
641 | kp->input->keycode, kp->input->keybit); | 633 | PM8XXX_MAX_ROWS, PM8XXX_MAX_COLS, |
634 | kp->keycodes, kp->input); | ||
635 | if (rc) { | ||
636 | dev_err(&pdev->dev, "failed to build keymap\n"); | ||
637 | goto err_get_irq; | ||
638 | } | ||
642 | 639 | ||
640 | if (pdata->rep) | ||
641 | __set_bit(EV_REP, kp->input->evbit); | ||
643 | input_set_capability(kp->input, EV_MSC, MSC_SCAN); | 642 | input_set_capability(kp->input, EV_MSC, MSC_SCAN); |
643 | |||
644 | input_set_drvdata(kp->input, kp); | 644 | input_set_drvdata(kp->input, kp); |
645 | 645 | ||
646 | /* initialize keypad state */ | 646 | /* initialize keypad state */ |