gpio: aggregator: refactor the code to add GPIO desc in the forwarder
authorThomas Richard <thomas.richard@bootlin.com>
Mon, 11 Aug 2025 13:25:46 +0000 (15:25 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 11 Aug 2025 13:39:31 +0000 (15:39 +0200)
commitc44ce91b8ada680074aa976e61fcef5633e6f086
tree28a5590cd3c9b53a1831c01e99f027e90eee6906
parent871c7cd54830c0bda15513238ea9d46fc1cae991
gpio: aggregator: refactor the code to add GPIO desc in the forwarder

Create a dedicated function to add a GPIO desc in the forwarder. Instead of
saving a GPIO descs array pointer, now the GPIO descs are passed one by one
to the forwarder which registers them in its own array. So after the call
of gpiochip_fwd_create(), the passed array can be free.

Reviewed-by: Andy Shevchenko <andy@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://lore.kernel.org/r/20250811-aaeon-up-board-pinctrl-support-v9-3-29f0cbbdfb30@bootlin.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-aggregator.c