gpio: sysfs: pass the GPIO device - not chip - to sysfs callbacks
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 24 Jan 2024 14:11:38 +0000 (15:11 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 12 Feb 2024 09:50:58 +0000 (10:50 +0100)
commitb93bca4bd6d221d5f34a20d69ec0f1ec636ae7df
tree85828a3f8a0d0fd8f6fb826ff51333398d7eb078
parent59cba4a0e6ca1058fbf88fec22530a4e2841802a
gpio: sysfs: pass the GPIO device - not chip - to sysfs callbacks

We're working towards protecting the chip pointer in struct gpio_device
with SRCU. In order to use it in sysfs callbacks we must pass the pointer
to the GPIO device that wraps the chip instead of the address of the
chip itself as the user data.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/gpio/gpiolib-sysfs.c