]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpio: sysfs: don't look up exported lines as class devices
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 4 Jul 2025 12:58:54 +0000 (14:58 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 16 Jul 2025 08:27:08 +0000 (10:27 +0200)
commit1cd53df733c21ae0d344a2dec941a3e2a06fefd9
tree3450c0e2206f3ad1410441de3b09a49846df6e40
parentf7d4fb62d04542646a48de08b10354692f3b98ce
gpio: sysfs: don't look up exported lines as class devices

In preparation for adding a parallel, per-chip attribute group for
exported GPIO lines, stop using class device APIs to refer to it in the
code. When unregistering the chip, don't call class_find_device() but
instead store exported lines in a linked list inside the GPIO chip data
object and look it up there.

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