gpiolib: unify two loops initializing GPIO descriptors
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 4 Oct 2024 14:43:23 +0000 (16:43 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 8 Oct 2024 08:21:46 +0000 (10:21 +0200)
commitfa17f749ee5bc6afdaa9e0ddbe6a816b490dad7d
treeef60fcfc737bbe7e9d61318988338c7ae10684ad
parentee194b12bf9a2f2ed57b9c5bc7a5f221f7f4a06f
gpiolib: unify two loops initializing GPIO descriptors

We currently iterate over the descriptors owned by the GPIO device we're
adding twice with the first loop just setting the gdev pointer. It's not
used anywhere between this and the second loop so just drop the first
one and move the assignment to the second.

Reviewed-by: Kent Gibson <warthog618@gmail.com>
Link: https://lore.kernel.org/r/20241004-gpio-notify-in-kernel-events-v1-2-8ac29e1df4fe@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpiolib.c