]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: bu27034: simplify using guard(mutex)
authorMatti Vaittinen <mazziesaccount@gmail.com>
Thu, 21 Nov 2024 13:05:19 +0000 (15:05 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 7 Dec 2024 17:47:58 +0000 (17:47 +0000)
commit439c2cef8157bd3856200effdf4bb4ce3ff8e774
treece25d1e7271e091edb77c766776376d3be5e04ba
parentd95986fb818d3f76841f2cd32c74dd7961a2a15d
iio: bu27034: simplify using guard(mutex)

The BU27034 uses mutex for protecting the gain / time / scale changes.
The clean-up for a few of the functions can be slightly simplified by
removing the goto-based error handling/unlocking and by utilizing the
guard(mutex) scoped mutex handling instead.

Simplify driver by using the scoped mutexes.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/4e65a4725c211b166906f70fdb5ba90f2af0f570.1732193263.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/rohm-bu27034.c