Skip to content

iio: adc: Use cleanup.h guards for mutex locking

Vaibhav Chahar linux-iio lkml 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review
  2. v11 patch 1 replySuperseded

Changes in v2 from the cover letter

- 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).

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2iio: adc: mcp3564: Use guard() and scoped_guard() to manage mutexdrivers/iio/adc/mcp3564.c+36 -271 reply
2/2iio: adc: palmas_gpadc: Use guard(mutex) to manage locksdrivers/iio/adc/palmas_gpadc.c+17 -291 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

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

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(-)
Signature · 1 line
2.56.0