Commit 8757145af0cc7d51dc4d491c9a2248ece50b9932

Authored by Alexandre Pereira da Silva
Committed by Dmitry Torokhov
1 parent caaa357dc0

Input: gpio_keys_polled - fix dt pdata->nbuttons

pdata->nbuttons should be updated by the dt code.

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

drivers/input/keyboard/gpio_keys_polled.c
... ... @@ -129,6 +129,7 @@
129 129 }
130 130  
131 131 pdata->buttons = (struct gpio_keys_button *)(pdata + 1);
  132 + pdata->nbuttons = nbuttons;
132 133  
133 134 pdata->rep = !!of_get_property(node, "autorepeat", NULL);
134 135 of_property_read_u32(node, "poll-interval", &pdata->poll_interval);