Thread (6 messages) 6 messages, 3 authors, 2012-06-25

Re: [PATCH RESEND] input: gpio_keys_polled: convert to dt

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2012-06-21 09:18:41
Also in: linux-input, lkml

Hi Alexandre,

On Wed, Jun 20, 2012 at 08:34:21AM -0300, Alexandre Pereira da Silva wrote:
quoted hunk ↗ jump to hunk
Add device tree support to gpio_keys_polled.c

Signed-off-by: Alexandre Pereira da Silva <redacted>
Tested-by: Roland Stigge <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help