Commit 2ce5314c authored by Jonathan Cameron's avatar Jonathan Cameron
Browse files

iio: adc: max1027: Move claim of direct mode up one level and use guard()



Move iio_device_claim_direct_mode() into the read_raw() callback
and use guard() to release a mutex. This enables simpler error
handling via direct returns.

Reviewed-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://patch.msgid.link/20250217141630.897334-24-jic23@kernel.org


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 173386d0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment