diff mbox

input: gpio_keys_polled: fix dt pdata->nbuttons

Message ID 1347485243-21173-1-git-send-email-aletes.xgr@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alexandre Pereira da Silva Sept. 12, 2012, 9:27 p.m. UTC
pdata->nbuttons should be updated by the dt code.

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
---
 drivers/input/keyboard/gpio_keys_polled.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Dmitry Torokhov Sept. 13, 2012, 4:49 a.m. UTC | #1
On Wed, Sep 12, 2012 at 06:27:23PM -0300, Alexandre Pereira da Silva wrote:
> pdata->nbuttons should be updated by the dt code.
> 
> Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>

Applied, thank you Alexandre.
 
> ---
>  drivers/input/keyboard/gpio_keys_polled.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c
> index 7908952..f2142de 100644
> --- a/drivers/input/keyboard/gpio_keys_polled.c
> +++ b/drivers/input/keyboard/gpio_keys_polled.c
> @@ -129,6 +129,7 @@ gpio_keys_polled_get_devtree_pdata(struct device *dev)
>  	}
>  
>  	pdata->buttons = (struct gpio_keys_button *)(pdata + 1);
> +	pdata->nbuttons = nbuttons;
>  
>  	pdata->rep = !!of_get_property(node, "autorepeat", NULL);
>  	of_property_read_u32(node, "poll-interval", &pdata->poll_interval);
> -- 
> 1.7.10
>
diff mbox

Patch

diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c
index 7908952..f2142de 100644
--- a/drivers/input/keyboard/gpio_keys_polled.c
+++ b/drivers/input/keyboard/gpio_keys_polled.c
@@ -129,6 +129,7 @@  gpio_keys_polled_get_devtree_pdata(struct device *dev)
 	}
 
 	pdata->buttons = (struct gpio_keys_button *)(pdata + 1);
+	pdata->nbuttons = nbuttons;
 
 	pdata->rep = !!of_get_property(node, "autorepeat", NULL);
 	of_property_read_u32(node, "poll-interval", &pdata->poll_interval);