diff options
author | Matti Vaittinen <mazziesaccount@gmail.com> | 2024-11-28 11:01:48 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-12-07 17:49:11 +0000 |
commit | 725521e1f485d4687790f2e459271f1ad6af64d5 (patch) | |
tree | 2066043744461c70d8af8ccebbb699f5449f6eb0 /drivers/iio/trigger/stm32-timer-trigger.c | |
parent | 0c39208bc3af6f7afcbcdb675ad8fbe6b3022865 (diff) |
iio: accel: kx022a: Use cleanup.h helpers
A few functions in KX022A need to use mutex for protecting the
enabling/disabling of the measurement while configurations are being
made. Some of the functions can be slightly simplified by using the
__cleanup based scoped mutexes, which allows dropping the goto based
unlocking at error path.
Simplify error paths using guard(mutex).
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://patch.msgid.link/4785f841ad5f131356ba78b4f3c76f676d86a2e8.1732783834.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/trigger/stm32-timer-trigger.c')
0 files changed, 0 insertions, 0 deletions