[PATCH v2 0/2] iio: adc: Use cleanup.h guards for mutex locking

From: Vaibhav Chahar

Date: Mon Nov 23 2026 - 12:29:13 EST


Modernize mutex locking in the mcp3564 and palmas_gpadc ADC drivers by
replacing manual mutex_lock() and mutex_unlock() calls with cleanup.h
guard(mutex) and scoped_guard() helpers.

Changes in v2:
- Patch 1 (mcp3564): Wrap switch cases containing guard() in braces,
add blank lines around guard() calls, and clean up the commit message.
- Patch 2 (palmas_gpadc): New patch converting palmas_gpadc calls to
guard(mutex).

Vaibhav Chahar (2):
iio: adc: mcp3564: Use guard() and scoped_guard() to manage mutex
iio: adc: palmas_gpadc: Use guard(mutex) to manage locks

drivers/iio/adc/mcp3564.c | 63 +++++++++++++++++++---------------
drivers/iio/adc/palmas_gpadc.c | 46 +++++++++----------------
2 files changed, 53 insertions(+), 56 deletions(-)

--
2.56.0