mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] iio: adc: Use guard(mutex) to manage locks
@ 2026-11-24 20:40 Vaibhav Chahar
  2026-11-24 20:40 ` [PATCH v3 1/2] iio: adc: mcp3564: Use guard() " Vaibhav Chahar
  2026-11-24 20:40 ` [PATCH v3 2/2] iio: adc: palmas_gpadc: Use guard(mutex) " Vaibhav Chahar
  0 siblings, 2 replies; 3+ messages in thread
From: Vaibhav Chahar @ 2026-11-24 20:40 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio
  Cc: Marius Cristea, David Lechner, Nuno Sá,
	Andy Shevchenko, Joshua Crofts, linux-kernel

Thank you for reviewing my sloppy v2 of this series and giving feedback

Convert the mcp3564 and palmas_gpadc ADC drivers from manual
mutex_lock()/mutex_unlock() pairs to guard(mutex) to simplify error
handling.

Changes in v3:
- mcp3564: Use of guard(mutex) across all paths. (Dropping __func__
  from dev_dbg() calls will follow in a separate patch.)
- palmas_gpadc: Make helper function palmas_gpadc_read_raw_locked() so
  palmas_gpadc_read_done() always runs before unlocking safely.

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() to manage mutex
  iio: adc: palmas_gpadc: Use guard(mutex) to manage locks

 drivers/iio/adc/mcp3564.c      |  97 +++++++++++++++--------------
 drivers/iio/adc/palmas_gpadc.c | 110 +++++++++++++--------------------
 2 files changed, 96 insertions(+), 111 deletions(-)

-- 
2.56.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-24 20:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-24 20:40 [PATCH v3 0/2] iio: adc: Use guard(mutex) to manage locks Vaibhav Chahar
2026-11-24 20:40 ` [PATCH v3 1/2] iio: adc: mcp3564: Use guard() " Vaibhav Chahar
2026-11-24 20:40 ` [PATCH v3 2/2] iio: adc: palmas_gpadc: Use guard(mutex) " Vaibhav Chahar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®