Re: [RFT PATCH 15/21] arm: omap1: ams-delta: stop using gpiochip_find()
Bartosz Golaszewski <[email protected]> Thu, 7 Sep 2023 09:57:57 +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 | <CAMRc=McBMTrcVpjWr2Qo2N5Z6+BEAWr6kLG_bPDmmuO=OFTtfg@mail.gmail.com> |
On Thu, Sep 7, 2023 at 9:35 AM Linus Walleij <[email protected]> wrote: > > Oops one more note: > > On Tue, Sep 5, 2023 at 8:53 PM Bartosz Golaszewski <[email protected]> wrote: > > > From: Bartosz Golaszewski <[email protected]> > > > > gpiochip_find() is going away as it's not hot-unplug safe. This platform > > is not affected by any of the related problems as this GPIO controller > > cannot really go away but in order to finally remove this function, we > > need to convert it to using gpio_device_find() as well. > > > > Signed-off-by: Bartosz Golaszewski <[email protected]> > (...) > > + struct gpio_device *gdev; > (...) > > + gdev = gpio_device_find_by_label(OMAP_GPIO_LABEL); > > This leaves a reference to the gdev right? No scoped guard? > > If you leave a dangling reference intentionally I think it warrants > a comment ("leaving a ref here so the device will never be > free:ed"). > It's right there in the comment. :) Bart