浏览代码

Input: gpio_keys - remove useless reinitialization of pdata->nbuttons

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>
Tobias Klauser 13 年之前
父节点
当前提交
4eceb14f66
共有 1 个文件被更改,包括 0 次插入1 次删除
  1. 0 1
      drivers/input/keyboard/gpio_keys.c

+ 0 - 1
drivers/input/keyboard/gpio_keys.c

@@ -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++;