Re: [RFT PATCH 14/21] hte: tegra194: don't access struct gpio_chip
Linus Walleij <[email protected]> Thu, 7 Sep 2023 09:28:17 +0200
| Newsgroups | dev.linux.lists.timestamp,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-acpi,org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel,org.kernel.vger.linux-omap,org.kernel.vger.linux-tegra,org.kernel.vger.platform-driver-x86 |
|---|---|
| Message-ID | <CACRpkda9=VULj4Cy_sit-UpUQnVEbS-RJKAeULVCw8ZCRTq1sw@mail.gmail.com> |
On Tue, Sep 5, 2023 at 8:53 PM Bartosz Golaszewski <[email protected]> wrote: > From: Bartosz Golaszewski <[email protected]> > > 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 <[email protected]> As Andy points out add <linux/cleanup.h>, with that fixed: Reviewed-by: Linus Walleij <[email protected]> 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