Re: [PATCH] gpio: Move freeing of GPIO hogs before numbing of the device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 19, 2016 at 6:29 PM, Geert Uytterhoeven
<geert@xxxxxxxxxxxxxx> wrote:

> When removing a gpiochip that uses GPIO hogging (e.g. by unloading the
> chip's DT overlay), a warning is printed:
>
>     gpio gpiochip8: REMOVING GPIOCHIP WITH GPIOS STILL REQUESTED
>
> This happens because gpiochip_free_hogs() is called after the gdev->chip
> pointer is reset to NULL. Hence __gpiod_free() cannot determine the
> chip in use, and cannot clear flags nor call the optional chip-specific
> .free() callback.
>
> Move the call to gpiochip_free_hogs() up to fix this.
>
> Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

Patch applied to fixes and tagged for stable.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux