Skip to content

Commit

Permalink
Input: gpio_keys - remove useless reinitialization of pdata->nbuttons
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Tobias Klauser authored and Dmitry Torokhov committed Jun 12, 2012
1 parent 8680917 commit 4eceb14
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/input/keyboard/gpio_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,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++;
Expand Down

0 comments on commit 4eceb14

Please sign in to comment.