]> git.ipfire.org Git - thirdparty/linux.git/commit
gpio: sysfs: only get the dirent reference for the value attr once
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 4 Jul 2025 12:58:50 +0000 (14:58 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 16 Jul 2025 08:27:07 +0000 (10:27 +0200)
commitc38c3a349b7bb994252e93c7c122fa0b50ddf12b
tree2dcf8e7d47213f8d4a0284eeb6ea98be84a1e6b3
parent2028f854b3f5b3816cd5d5dd83057a873eddc4d6
gpio: sysfs: only get the dirent reference for the value attr once

There's no reason to retrieve the reference to the sysfs dirent every
time we request an interrupt, we can as well only do it once when
exporting the GPIO.

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