aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorGravatar Bartosz Golaszewski <bartosz.golaszewski@linaro.org> 2024-01-24 16:29:39 +0100
committerGravatar Bartosz Golaszewski <bartosz.golaszewski@linaro.org> 2024-02-12 10:50:42 +0100
commit2a9101e875bc3aa6423b559e0ea43b2077f3be87 (patch)
tree59011ef0ef787908e1d5495fa816e3a337f36c23 /drivers/gpio/gpiolib.c
parentgpio: protect the descriptor label with SRCU (diff)
downloadlinux-2a9101e875bc3aa6423b559e0ea43b2077f3be87.tar.gz
linux-2a9101e875bc3aa6423b559e0ea43b2077f3be87.tar.bz2
linux-2a9101e875bc3aa6423b559e0ea43b2077f3be87.zip
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.c2
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. */