[PATCH v3 0/6] gpio: acpi: modernize resource management using cleanup.h

From: Marco Scardovi

Date: Thu May 07 2026 - 12:04:07 EST


Hi Andy, Mika,
thanks for the patience: I was way too excited about my first patch on
the linux kernel and let it takes over the reasoning and I'm sorry for that.
I've moved the defines on the right places as requested and refactored the
patches to be smaller and tested the build with KASAN and kmemleak as requested
by @Mika without any visible regression as for now.

Marco Scardovi (6):
ACPI: Move DEFINE_FREE(acpi_free) to global header
gpiolib: Move DEFINE_FREE(free_gpio_desc) to driver header
gpio: acpi: ignore out-of-range pins in acpi_gpiochip_alloc_event()
gpio: acpi: use guard(mutex) for conn_lock
gpio: acpi: use cleanup.h for automated resource deallocation
gpio: acpi: sort header inclusion alphabetically

drivers/gpio/gpiolib-acpi-core.c | 57 ++++++++++++++------------------
include/linux/acpi.h | 2 ++
include/linux/gpio/driver.h | 2 ++
3 files changed, 28 insertions(+), 33 deletions(-)

--
2.54.0