[PATCH 4/4] input: gpio-keys: drop now-superfluous struct gpio_keys::dev

Ahmad Fatoum a.fatoum at pengutronix.de
Tue Apr 2 06:50:35 PDT 2024


Now that gpio-keys populates the new struct input_device::parent member,
there is no need to duplicate the information in struct gpio_keys.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 drivers/input/gpio_keys.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/input/gpio_keys.c b/drivers/input/gpio_keys.c
index 190865b7f244..c897acf3bd02 100644
--- a/drivers/input/gpio_keys.c
+++ b/drivers/input/gpio_keys.c
@@ -31,7 +31,6 @@ struct gpio_keys {
 
 	struct poller_async poller;
 	struct input_device input;
-	struct device *dev;
 };
 
 static void gpio_key_poller(void *data)
@@ -60,7 +59,7 @@ static void gpio_key_poller(void *data)
 
 			gb->debounce_start = get_time_ns();
 			input_report_key_event(&gk->input, gb->code, pressed);
-			dev_dbg(gk->dev, "%s gpio(%d) as %d\n",
+			dev_dbg(gk->input.parent, "%s gpio(%d) as %d\n",
 				pressed ? "pressed" : "released", gb->gpio, gb->code);
 			gb->previous_state = val;
 		}
@@ -141,8 +140,6 @@ static int __init gpio_keys_probe(struct device *dev)
 
 	gk = xzalloc(sizeof(*gk));
 
-	gk->dev = dev;
-
 	if (dev->of_node)
 		ret = gpio_keys_probe_dt(gk, dev);
 	else
-- 
2.39.2




More information about the barebox mailing list