diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2024-01-24 16:29:39 +0100 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2024-02-12 10:50:42 +0100 |
commit | 2a9101e875bc3aa6423b559e0ea43b2077f3be87 (patch) | |
tree | 59011ef0ef787908e1d5495fa816e3a337f36c23 /drivers/gpio/gpiolib.c | |
parent | 1f2bcb8c8ccdf9dc2e46f7986e1e22408506a6d6 (diff) |
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>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r-- | drivers/gpio/gpiolib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index c72f3ffbe6b4..f0cbbab17dc3 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -85,7 +85,7 @@ DEFINE_SPINLOCK(gpio_lock); static DEFINE_MUTEX(gpio_lookup_lock); static LIST_HEAD(gpio_lookup_list); -LIST_HEAD(gpio_devices); +static LIST_HEAD(gpio_devices); /* Protects the GPIO device list against concurrent modifications. */ static DEFINE_MUTEX(gpio_devices_lock); /* Ensures coherence during read-only accesses to the list of GPIO devices. */ |