[PATCH v4 0/2] iio: accel: convert to guard(mutex)

Rajveer Chaudhari posted 2 patches 1 month ago
There is a newer version of this series
drivers/iio/accel/adxl313_core.c | 11 ++++-------
drivers/iio/accel/adxl372.c      | 13 +++++--------
2 files changed, 9 insertions(+), 15 deletions(-)
[PATCH v4 0/2] iio: accel: convert to guard(mutex)
Posted by Rajveer Chaudhari 1 month ago
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