Re: [PATCH v2 4/7] gpiolib: add support for scope-based management of GPIO descriptors

From: Andy Shevchenko

Date: Wed Nov 04 2026 - 07:10:54 EST


On Tue, Nov 03, 2026 at 07:40:32PM -0800, Dmitry Torokhov wrote:
> Add DEFINE_FREE() definitions for gpiod_put and gpiod_put_array to
> allow using __free(gpiod_put) and __free(gpiod_put_array) for automatic,
> scope-based cleanup of individual GPIO descriptors and descriptor
> arrays. Place these definitions after the CONFIG_GPIOLIB check so that
> they are available regardless of whether CONFIG_GPIOLIB is enabled.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>

--
With Best Regards,
Andy Shevchenko