mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: lgo@pengutronix.de, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 4/4] input: gpio-keys: drop now-superfluous struct gpio_keys::dev
Date: Tue,  2 Apr 2024 15:50:35 +0200	[thread overview]
Message-ID: <20240402135035.3700601-5-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240402135035.3700601-1-a.fatoum@pengutronix.de>

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@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




  parent reply	other threads:[~2024-04-02 15:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02 13:50 [PATCH 0/4] input: add CONFIG_INPUT_EVBUG debug option Ahmad Fatoum
2024-04-02 13:50 ` [PATCH 1/4] input: record parent device at registration time Ahmad Fatoum
2024-04-02 13:50 ` [PATCH 2/4] input: add CONFIG_INPUT_EVBUG debug option Ahmad Fatoum
2024-04-02 13:50 ` [PATCH 3/4] input: imx-keypad: remove now-duplicate debug messages Ahmad Fatoum
2024-04-02 14:06   ` Ahmad Fatoum
2024-04-03 11:40     ` Sascha Hauer
2024-04-02 13:50 ` Ahmad Fatoum [this message]
2024-04-03 11:39 ` [PATCH 0/4] input: add CONFIG_INPUT_EVBUG debug option Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240402135035.3700601-5-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=lgo@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox