Re: [PATCH] gpiolib: unexport requested gpios on gpiochip removal

From: Johan Hovold
Date: Wed Jun 10 2015 - 13:30:03 EST


Hi Bartosz,

On Wed, Jun 10, 2015 at 04:34:21PM +0200, Bartosz Golaszewski wrote:
> When a GPIO expander device is removed - e.g. via i2c-adapter
> new_device/delete_device interface - with some GPIOs still requested,
> gpiochip_remove() function will emit a warning but remove the chip
> anyway.
>
> If we then reinstantiate this device and try to export any of the GPIOs
> still requested on gpiochip deletion the following warning will be
> emitted:

For GPIOs exported through sysfs, this has already been fixed by commit
483d82110879 ("gpio: sysfs: fix memory leaks and device hotplug"), which
has also been backported to stable.

Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/