mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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 <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250704-gpio-sysfs-chip-export-v4-1-9289d8758243@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
parent
26b6443826
commit
32ad0b9a17
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue