[RFT PATCH 14/21] hte: tegra194: don't access struct gpio_chip

Bartosz Golaszewski brgl at bgdev.pl
Wed Oct 4 05:00:58 PDT 2023


On Thu, Sep 7, 2023 at 9:28 AM Linus Walleij <linus.walleij at linaro.org> wrote:
>
> On Tue, Sep 5, 2023 at 8:53 PM Bartosz Golaszewski <brgl at bgdev.pl> wrote:
>
> > From: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
> >
> > Using struct gpio_chip is not safe as it will disappear if the
> > underlying driver is unbound for any reason. Switch to using reference
> > counted struct gpio_device and its dedicated accessors.
> >
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
>
> As Andy points out add <linux/cleanup.h>, with that fixed:
> Reviewed-by: Linus Walleij <linus.walleij at linaro.org>
>
> I think this can be merged into the gpio tree after leaving some
> slack for the HTE maintainer to look at it, things look so much
> better after this.
>
> Yours,
> Linus Walleij

Dipen,

if you could give this patch a test and possibly ack it for me to take
it through the GPIO tree (or go the immutable tag from HTE route) then
it would be great. This is the last user of gpiochip_find() treewide,
so with it we could remove it entirely for v6.7.

Bart



More information about the linux-arm-kernel mailing list