]> git.ipfire.org Git - thirdparty/linux.git/commit
gpio: sysfs: pass gpiod_data directly to internal GPIO sysfs functions
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 4 Jul 2025 12:58:51 +0000 (14:58 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 16 Jul 2025 08:27:07 +0000 (10:27 +0200)
commit7c49c1298f3ab3331008e85ac22b2d32b4bb450f
treebd66aefe4ebf439ab856de6370b9c7890fa505d1
parentc38c3a349b7bb994252e93c7c122fa0b50ddf12b
gpio: sysfs: pass gpiod_data directly to internal GPIO sysfs functions

We don't use any fields from struct device in gpio_sysfs_request_irq(),
gpio_sysfs_free_irq() and gpio_sysfs_set_active_low(). We only use the
dev argument to get the associated struct gpiod_data pointer with
dev_get_drvdata().

To make the transition to not using dev_get_drvdata() across line
callbacks for sysfs attributes easier, pass gpiod_data directly to
these functions instead of having it wrapped in struct device.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250704-gpio-sysfs-chip-export-v4-4-9289d8758243@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpiolib-sysfs.c