diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2024-04-02 15:50:35 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-04-03 13:39:47 +0200 |
commit | 47b2ae8489ed51970f6119d7b5a248dac9b41771 (patch) | |
tree | 803ddd2eb2119c4720d0f54c38993df6898d6f45 | |
parent | 648bfcfb968476de9197d1372ed8e5c22e78c3ca (diff) | |
download | barebox-47b2ae8489ed.tar.gz barebox-47b2ae8489ed.tar.xz |
input: gpio-keys: drop now-superfluous struct gpio_keys::dev
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>
Link: https://lore.barebox.org/20240402135035.3700601-5-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/input/gpio_keys.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/input/gpio_keys.c b/drivers/input/gpio_keys.c index 190865b7f2..c897acf3bd 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 |