[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120621091833.GH2193@core.coreip.homeip.net>
Date: Thu, 21 Jun 2012 02:18:33 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Alexandre Pereira da Silva <aletes.xgr@...il.com>
Cc: Grant Likely <grant.likely@...retlab.ca>,
Rob Herring <rob.herring@...xeda.com>,
JJ Ding <dgdunix@...il.com>, Roland Stigge <stigge@...com.de>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree-discuss@...ts.ozlabs.org
Subject: Re: [PATCH RESEND] input: gpio_keys_polled: convert to dt
Hi Alexandre,
On Wed, Jun 20, 2012 at 08:34:21AM -0300, Alexandre Pereira da Silva wrote:
> Add device tree support to gpio_keys_polled.c
>
> Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@...il.com>
> Tested-by: Roland Stigge <stigge@...com.de>
> ---
> drivers/input/keyboard/gpio_keys_polled.c | 121 +++++++++++++++++++++++++++--
> 1 file changed, 113 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c
> index 20c8ab1..a64b361 100644
> --- a/drivers/input/keyboard/gpio_keys_polled.c
> +++ b/drivers/input/keyboard/gpio_keys_polled.c
> @@ -25,6 +25,8 @@
> #include <linux/platform_device.h>
> #include <linux/gpio.h>
> #include <linux/gpio_keys.h>
> +#include <linux/of_platform.h>
> +#include <linux/of_gpio.h>
>
> #define DRV_NAME "gpio-keys-polled"
>
> @@ -38,7 +40,7 @@ struct gpio_keys_button_data {
> struct gpio_keys_polled_dev {
> struct input_polled_dev *poll_dev;
> struct device *dev;
> - struct gpio_keys_platform_data *pdata;
> + struct gpio_keys_platform_data pdata;
I am not sure why this change is needed. Also it seems that the driver
leaks DT-created pdata on unload.
> +
> +#define gpio_keys_polled_of_match NULL
Please use of_match_ptr() instead.
Thanks.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists