diff options
| author | Lucas Ivars Cadima Ciziks <lucas@ciziks.com> | 2026-04-24 09:43:40 -0300 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-04-27 09:58:24 +0100 |
| commit | 9d5129c73bd0151e0f165b88e968a91ceef91275 (patch) | |
| tree | b70c8e2fbe585eb64d743ad427b22dcc74b322bd /include/linux/platform_data | |
| parent | d7117c14cd6b3cfdf7206395d8e9c4d7d96107ff (diff) | |
iio: adc: ad7280a: use cleanup helpers guard() and scoped_guard() for mutex locking
Replace open-coded mutex_lock/unlock pairs with the cleanup-based
guard() and scoped_guard() helpers in ad7280a_write_thresh(),
ad7280_show_balance_timer(), ad7280_store_balance_sw(),
ad7280_store_balance_timer() and ad7280_read_raw().
This removes the need for the err_unlock label and explicit
mutex_unlock() calls, as the lock is now automatically released
when the function returns or the guarded scope exits, regardless
of the exit path.
Signed-off-by: Lucas Ivars Cadima Ciziks <lucas@ciziks.com>
Co-developed-by: Matheus Giarola <matheusgiarola@usp.br>
Signed-off-by: Matheus Giarola <matheusgiarola@usp.br>
Co-developed-by: Felipe Ribeiro de Souza <felipers@usp.br>
Signed-off-by: Felipe Ribeiro de Souza <felipers@usp.br>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux/platform_data')
0 files changed, 0 insertions, 0 deletions
