Re: [PATCH] gpiolib: unduplicate the pointer used for storing GPIO chip data

From: Bartosz Golaszewski

Date: Mon Jul 20 2026 - 06:17:24 EST


On Fri, 17 Jul 2026 14:37:31 +0200, Bartosz Golaszewski
<bartosz.golaszewski@xxxxxxxxxxxxxxxx> said:
> We currently carry a dedicated pointer inside struct gpio_device for
> storing the driver data. However: struct gpio_device already embeds a
> struct device which is not accessed by anyone other than GPIO core and
> also has a dedicated driver data pointer which is currently unused.
> Convert gpiochip_set/get_data() to calling dev_set/get_drvdata() on the
> GPIO device's struct device and remove the duplicated pointer from
> struct gpio_device.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>
> ---

Sashiko is right, this will break sysfs unbinding so let's drop this.

Bart