[PATCH v2 0/2] platform/x86: thinkpad_acpi: cleanup conversions

From: Dmitry Torokhov

Date: Wed Sep 30 2026 - 01:01:51 EST


This series converts thinkpad_acpi resource management to use helpers
from linux/cleanup.h:
- Convert conditional mutex lock calls to ACQUIRE() and ACQUIRE_ERR()
- Use __free(kfree) for local pointer allocations

Changes in v2:
- Dropped patch 1 ("convert mutex_lock() to guard(mutex)") as it was
already applied upstream.
- Preserved 0 return value on failure in brightness_get().
- Fixed auxmac_init() to avoid setting auxmac to "unavailable" before
evaluating the MACA ACPI method.
- Collected Reviewed-by and Tested-by trailers.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
---
Dmitry Torokhov (2):
platform/x86: thinkpad_acpi: convert conditional mutex locks to ACQUIRE_ERR()
platform/x86: thinkpad_acpi: use __free(kfree) for automatic cleanup

drivers/platform/x86/lenovo/thinkpad_acpi.c | 190 +++++++++++++---------------
1 file changed, 87 insertions(+), 103 deletions(-)
---
base-commit: 6474fa070f2b8013b4b87350b775b8c3be6e8aac
change-id: 20260929-thinkpad-acpi-cleanup-8d4e7264690d

Thanks.

--
Dmitry