[PATCH 0/3] iio: accel: adxl313: small cleanups and error-handling improvements

From: Sanjay Chitroda

Date: Thu Apr 16 2026 - 01:17:16 EST


From: Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx>

Hi all,

This series contains a few small cleanups and robustness improvements
to the ADXL313 IIO accelerometer driver.

The changes modernize mutex handling using devm-managed helpers and
guard() to simplify locking logic and improve safety. In addition,
error handling during probe is cleaned up by switching to dev_err_probe()
to better handle deferred probing and avoid repeated log noise.

No functional changes are intended.

Testing:
- Compiled with W=1
- Build-tested on QEMU x86_64

Based on:
<linux-v7.0-rc7>

Thanks,
Sanjay Chitroda

Sanjay Chitroda (3):
iio: accel: adxl313_core: Use devm-managed mutex initialization
iio: accel: adxl313_core: use guard() to release mutex
iio: accel: adxl313: Use dev_err_probe

drivers/iio/accel/adxl313_core.c | 20 ++++++++------------
drivers/iio/accel/adxl313_i2c.c | 8 +++-----
drivers/iio/accel/adxl313_spi.c | 8 +++-----
3 files changed, 14 insertions(+), 22 deletions(-)

--
2.34.1