pdata is zeroed using memset just a few lines before, so there is no
need to set the nbuttons member to 0 again.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
drivers/input/keyboard/gpio_keys.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index ed1ed46..eb57690 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -472,7 +472,6 @@ static int gpio_keys_get_devtree_pdata(struct device *dev,
pdata->rep = !!of_get_property(node, "autorepeat", NULL);
/* First count the subnodes */
- pdata->nbuttons = 0;
pp = NULL;
while ((pp = of_get_next_child(node, pp)))
pdata->nbuttons++;
--
1.7.5.4