Input: gpio-keys-polled - honor 'autorepeat' setting in platform data
authorAlexander Shiyan <shc_work@mail.ru>
Thu, 29 Nov 2012 16:57:17 +0000 (08:57 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 29 Nov 2012 17:31:26 +0000 (09:31 -0800)
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/gpio_keys_polled.c

index 32e508781ddc99a8d1c906dc0cfda0c2062b19fb..d72d0e5ebb85467b10d6eab9b16ba04b50ae2573 100644 (file)
@@ -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];