diff options
| author | Maxwell Doose <m32285159@gmail.com> | 2026-05-21 17:30:43 -0500 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-05-31 11:01:47 +0100 |
| commit | f9242e31d16dec9958d0b65d8071823e2efdd9f6 (patch) | |
| tree | e058c31f35eb2160f8944adbe237af27666f0928 /rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git | |
| parent | f9f99197a88260046b56cf4d24e51aff849bd45b (diff) | |
iio: imu: kmx61: Use guard(mutex)() over manual locking
Include linux/cleanup.h to take advantage of new macros.
Replace manual mutex_lock() and mutex_unlock() calls across the file
with guard(mutex)() and scoped_guard() where appropriate to simplify
error paths and eliminate manual locking calls.
Add new helper function kmx61_read_for_each_active_channel() to mitigate
certain style issues and to prevent notifying that the IRQ is finished
whilst holding the lock.
Update certain returns, and add default case to return -EINVAL in
kmx61_read_raw().
Remove now-redundant gotos and ret variables, as the new RAII macros
make them unneeded.
Signed-off-by: Maxwell Doose <m32285159@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
