[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250704-gpio-sysfs-chip-export-v4-1-9289d8758243@linaro.org>
Date: Fri, 04 Jul 2025 14:58:48 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Ahmad Fatoum <a.fatoum@...gutronix.de>,
Kent Gibson <warthog618@...il.com>,
Jan Lübbe <jlu@...gutronix.de>,
Marek Vasut <marex@...x.de>, Geert Uytterhoeven <geert+renesas@...der.be>,
Linus Walleij <linus.walleij@...aro.org>,
Andy Shevchenko <andriy.shevchenko@...el.com>,
Bartosz Golaszewski <brgl@...ev.pl>
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: [PATCH v4 01/10] gpio: sysfs: use gpiod_is_equal() to compare GPIO
descriptors
From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
We have a dedicated comparator for GPIO descriptors that performs
additional checks and hides the implementation detail of whether the
same GPIO can be associated with two separate struct gpio_desc objects.
Use it in sysfs code
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
---
drivers/gpio/gpiolib-sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
index c4c21e25c682b939e4a0517393308343feb6585a..c4e85f2827697d0239ff6296caf49d243cf10fe8 100644
--- a/drivers/gpio/gpiolib-sysfs.c
+++ b/drivers/gpio/gpiolib-sysfs.c
@@ -657,7 +657,7 @@ static int match_export(struct device *dev, const void *desc)
{
struct gpiod_data *data = dev_get_drvdata(dev);
- return data->desc == desc;
+ return gpiod_is_equal(data->desc, desc);
}
/**
--
2.48.1
Powered by blists - more mailing lists