iio: adc: ti-ads7924: Use guard(mutex) in ADC read helper

Replace mutex_lock()/mutex_unlock() pair with guard(mutex)()
and move the lock into ads7924_get_adc_result(). Keeping the guard
in the helper makes the locking scope match the operation being protected.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Giorgi Tchankvetadze 2026-04-20 15:34:45 +04:00 • committed by Jonathan Cameron
commit 0179a95bbb