diff options
| author | Bartosz Golaszewski <[email protected]> | 2025-07-04 12:58:48 +0000 |
|---|---|---|
| committer | Bartosz Golaszewski <[email protected]> | 2025-07-16 08:27:07 +0000 |
| commit | 32ad0b9a17f9aa8dd9308feda671bda98b274d24 (patch) | |
| tree | 8a9e4dff683447165332cfdf45cdfd056271bdb9 /drivers/gpio/gpiolib-sysfs.c | |
| parent | gpio: wcove: use new GPIO line value setter callbacks (diff) | |
| download | kernel-32ad0b9a17f9aa8dd9308feda671bda98b274d24.tar.gz kernel-32ad0b9a17f9aa8dd9308feda671bda98b274d24.zip | |
gpio: sysfs: use gpiod_is_equal() to compare GPIO descriptors
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'drivers/gpio/gpiolib-sysfs.c')
| -rw-r--r-- | drivers/gpio/gpiolib-sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c index c4c21e25c682..c4e85f282769 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); } /** |
