mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/2] iio: accel: convert to guard(mutex)
@ 2026-03-07 11:49 Rajveer Chaudhari
  2026-03-07 11:49 ` [PATCH v4 1/2] iio: accel: adxl313: " Rajveer Chaudhari
  2026-03-07 11:49 ` [PATCH v4 2/2] iio: accel: adxl372: " Rajveer Chaudhari
  0 siblings, 2 replies; 4+ messages in thread
From: Rajveer Chaudhari @ 2026-03-07 11:49 UTC (permalink / raw)
  To: lucas.p.stankus, lars, Michael.Hennerich, jic23, nuno.sa, andy,
	puranjay, dlechner
  Cc: linux-iio, linux-kernel, Rajveer Chaudhari

This series converts manual mutex_lock/mutex_unlock pairs to
guard(mutex) in two ADXL accelerometer drivers. Each conversion
also simplifies error handling by removing goto labels and
returning directly on error paths.

adxl355 was considered but dropped as guard(mutex) leads to
code duplication due to the STANDBY/MEASUREMENT op_mode pattern,
making it less readable than the original code.

Ref to v3: [PATCH v3 0/3] iio: accel: convert to guard(mutex)

Rajveer Chaudhari (2):
  iio: accel: adxl313: convert to guard(mutex)
  iio: accel: adxl372: convert to guard(mutex)

 drivers/iio/accel/adxl313_core.c | 11 ++++-------
 drivers/iio/accel/adxl372.c      | 13 +++++--------
 2 files changed, 9 insertions(+), 15 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-03-07 17:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-07 11:49 [PATCH v4 0/2] iio: accel: convert to guard(mutex) Rajveer Chaudhari
2026-03-07 11:49 ` [PATCH v4 1/2] iio: accel: adxl313: " Rajveer Chaudhari
2026-03-07 11:49 ` [PATCH v4 2/2] iio: accel: adxl372: " Rajveer Chaudhari
2026-03-07 17:11   ` Jonathan Cameron

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®