[RFT PATCH 15/21] arm: omap1: ams-delta: stop using gpiochip_find()

Linus Walleij linus.walleij at linaro.org
Thu Sep 7 00:35:18 PDT 2023


Oops one more note:

On Tue, Sep 5, 2023 at 8:53 PM Bartosz Golaszewski <brgl at bgdev.pl> wrote:

> From: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
>
> 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 <bartosz.golaszewski at linaro.org>
(...)
> +       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").

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list