gpio: sysfs: use gpio_device_find() to iterate over existing devices
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 24 Jan 2024 15:29:39 +0000 (16:29 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 12 Feb 2024 09:50:42 +0000 (10:50 +0100)
commit2a9101e875bc3aa6423b559e0ea43b2077f3be87
tree59011ef0ef787908e1d5495fa816e3a337f36c23
parent1f2bcb8c8ccdf9dc2e46f7986e1e22408506a6d6
gpio: sysfs: use gpio_device_find() to iterate over existing devices

With the list of GPIO devices now protected with SRCU we can use
gpio_device_find() to traverse it from sysfs.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/gpio/gpiolib-sysfs.c
drivers/gpio/gpiolib.c
drivers/gpio/gpiolib.h