linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] input: use device_for_each_child_node_scoped()
@ 2024-04-12 20:57 Javier Carrasco
  2024-04-12 20:57 ` [PATCH 1/6] input: iqs269a: " Javier Carrasco
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Javier Carrasco @ 2024-04-12 20:57 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, linux-kernel, Javier Carrasco

Switch to the _scoped() version introduced in commit 365130fd47af
("device property: Introduce device_for_each_child_node_scoped()")
to remove the need for manual calling of fwnode_handle_put() in the
paths where the code exits the loop early. This modification simplifies
the code and eliminates the risk of leaking memory if any early exit is
added without de-allocating the child node.

There are six users of the non-scoped version in the input subsystem:

- iqs269a
- qt1050
- gpio_keys
- gpio_keys_polled
- adc-keys
- adc-joystick

This series is based on the master branch of linux-next (next-20240412)
to have access to the scoped version of device_for_each_child_node().

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
Javier Carrasco (6):
      input: iqs269a: use device_for_each_child_node_scoped()
      input: qt1050: use device_for_each_child_node_scoped()
      input: gpio_keys: use device_for_each_child_node_scoped()
      input: gpio_keys_polled: use device_for_each_child_node_scoped()
      input: adc-keys: use device_for_each_child_node_scoped()
      input: adc-joystick: use device_for_each_child_node_scoped()

 drivers/input/joystick/adc-joystick.c     | 16 +++++-----------
 drivers/input/keyboard/adc-keys.c         |  5 +----
 drivers/input/keyboard/gpio_keys.c        |  4 +---
 drivers/input/keyboard/gpio_keys_polled.c |  4 +---
 drivers/input/keyboard/qt1050.c           | 12 ++++--------
 drivers/input/misc/iqs269a.c              |  7 ++-----
 6 files changed, 14 insertions(+), 34 deletions(-)
---
base-commit: 9ed46da14b9b9b2ad4edb3b0c545b6dbe5c00d39
change-id: 20240404-input_device_for_each_child_node_scoped-0a55a76ad7ee

Best regards,
-- 
Javier Carrasco <javier.carrasco.cruz@gmail.com>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-07-16  4:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-12 20:57 [PATCH 0/6] input: use device_for_each_child_node_scoped() Javier Carrasco
2024-04-12 20:57 ` [PATCH 1/6] input: iqs269a: " Javier Carrasco
2024-04-12 20:57 ` [PATCH 2/6] input: qt1050: " Javier Carrasco
2024-07-16  1:03   ` Dmitry Torokhov
2024-07-16  4:17     ` Javier Carrasco
2024-07-16  4:23       ` Dmitry Torokhov
2024-04-12 20:57 ` [PATCH 3/6] input: gpio_keys: " Javier Carrasco
2024-04-12 20:57 ` [PATCH 4/6] input: gpio_keys_polled: " Javier Carrasco
2024-04-12 20:57 ` [PATCH 5/6] input: adc-keys: " Javier Carrasco
2024-04-12 20:57 ` [PATCH 6/6] input: adc-joystick: " Javier Carrasco
2024-07-16  1:05 ` [PATCH 0/6] input: " Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).