Input: gpio_keys_polled - fix dt pdata->nbuttons
authorAlexandre Pereira da Silva <aletes.xgr@gmail.com>
Thu, 13 Sep 2012 04:49:26 +0000 (21:49 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 13 Sep 2012 04:56:20 +0000 (21:56 -0700)
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>
drivers/input/keyboard/gpio_keys_polled.c

index 79089520621207cb992d0ebde94b9db31bf01928..f2142de789e76a44cc1fc316b90ef66a6fe46c0a 100644 (file)
@@ -129,6 +129,7 @@ gpio_keys_polled_get_devtree_pdata(struct device *dev)
        }
 
        pdata->buttons = (struct gpio_keys_button *)(pdata + 1);
+       pdata->nbuttons = nbuttons;
 
        pdata->rep = !!of_get_property(node, "autorepeat", NULL);
        of_property_read_u32(node, "poll-interval", &pdata->poll_interval);