]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: addac: ad74413r: simplify with cleanup.h
authorNuno Sa <nuno.sa@analog.com>
Wed, 16 Oct 2024 14:22:01 +0000 (16:22 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 21 Oct 2024 18:19:25 +0000 (19:19 +0100)
commit012091bc3c38c05224819fb39540b206ac08ad6b
tree1eda44d4c673dc91a18d5f90d6642be3b64fcda8
parentab9795c197acc21a1a9156599c8b6ace31baec0e
iio: addac: ad74413r: simplify with cleanup.h

Make use of mutex guard() and IIO iio_device_claim_direct_scoped() to
simplify code and error handling.

While at it, use devm_mutex_init() to initialize the mutex.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20241016-dev-ad74413r-minor-improv-v1-3-13c9c769237d@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/addac/ad74413r.c