[PATCH 1/1] gpio_keys: fix loop on buttons for request and configuration

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Sat Jan 26 09:40:29 EST 2013


Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 drivers/input/gpio_keys.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/gpio_keys.c b/drivers/input/gpio_keys.c
index 6f3c912..543ad1a 100644
--- a/drivers/input/gpio_keys.c
+++ b/drivers/input/gpio_keys.c
@@ -79,7 +79,7 @@ static int __init gpio_keys_probe(struct device_d *dev)
 	pdata->recv_fifo = kfifo_alloc(pdata->fifo_size);
 
 	for (i = 0; i < pdata->nbuttons; i++) {
-		gpio = pdata->buttons->gpio;
+		gpio = pdata->buttons[i].gpio;
 		ret = gpio_request(gpio, "gpio_keys");
 		if (ret) {
 			pr_err("gpio_keys: (%d) can not be requested\n", gpio);
-- 
1.7.10.4




More information about the barebox mailing list