Thread (32 messages) 32 messages, 3 authors, 2010-12-09
STALE5658d

[PATCH 7/8] input: gpio_keys_polled: remove a local variable

From: Gabor Juhos <hidden>
Date: 2010-11-30 18:44:28
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

The 'button' variable is used only once in the gpio_keys_polled_poll
routine. Remove that and use the '&pdata->buttons[i]' value directly
instead.

Signed-off-by: Gabor Juhos <redacted>
---
 drivers/input/keyboard/gpio_keys_polled.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c
index 7b6a333..61e1a92 100644
--- a/drivers/input/keyboard/gpio_keys_polled.c
+++ b/drivers/input/keyboard/gpio_keys_polled.c
@@ -73,14 +73,13 @@ static void gpio_keys_polled_poll(struct input_polled_dev *dev)
 	int i;
 
 	for (i = 0; i < bdev->pdata->nbuttons; i++) {
-		struct gpio_keys_button *button = &pdata->buttons[i];
 		struct gpio_keys_button_data *bdata = &bdev->data[i];
 
 		if (bdata->count < bdata->threshold)
 			bdata->count++;
 		else
-			gpio_keys_polled_check_state(input, button, bdata);
-
+			gpio_keys_polled_check_state(input, &pdata->buttons[i],
+						     bdata);
 	}
 }
 
-- 
1.7.2.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help