Re: [PATCH] input: gpio_keys_polled: fix dt pdata->nbuttons

2012-09-12 Thread Dmitry Torokhov
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 

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
> 

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] input: gpio_keys_polled: fix dt pdata->nbuttons

2012-09-12 Thread Alexandre Pereira da Silva
pdata->nbuttons should be updated by the dt code.

Signed-off-by: Alexandre Pereira da Silva 
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/