From 1a22e16fc3d6abc8d6323cc0973435439932fe5f Mon Sep 17 00:00:00 2001 From: Alexander Shiyan Date: Thu, 29 Nov 2012 08:57:17 -0800 Subject: [PATCH] Input: gpio-keys-polled - honor 'autorepeat' setting in platform data Signed-off-by: Alexander Shiyan Signed-off-by: Dmitry Torokhov --- drivers/input/keyboard/gpio_keys_polled.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c index 32e508781ddc..d72d0e5ebb85 100644 --- a/drivers/input/keyboard/gpio_keys_polled.c +++ b/drivers/input/keyboard/gpio_keys_polled.c @@ -245,7 +245,6 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) input = poll_dev->input; - input->evbit[0] = BIT(EV_KEY); input->name = pdev->name; input->phys = DRV_NAME"/input0"; input->dev.parent = &pdev->dev; @@ -255,6 +254,10 @@ static int gpio_keys_polled_probe(struct platform_device *pdev) input->id.product = 0x0001; input->id.version = 0x0100; + __set_bit(EV_KEY, input->evbit); + if (pdata->rep) + __set_bit(EV_REP, input->evbit); + for (i = 0; i < pdata->nbuttons; i++) { struct gpio_keys_button *button = &pdata->buttons[i]; struct gpio_keys_button_data *bdata = &bdev->data[i]; -- 2.20.1