]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: light: as73211: Use guard() and move mode switch into inner write_raw fucntion
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 9 Mar 2025 17:06:19 +0000 (17:06 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 22 Apr 2025 18:09:55 +0000 (19:09 +0100)
commit8dd92667f0a55ca5b848bae36bbf7ad4a8837ccc
treed735fe38c21d3717f7e096849ca97b53a9c5e8e8
parentd793d614dc3f771901d3d10c5079830743dec897
iio: light: as73211: Use guard() and move mode switch into inner write_raw fucntion

By using guard(mutex) and moving code that switches the device to config
mode into _as73211_write_raw() the error flow is simplified.

Cc: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250309170633.1347476-5-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/as73211.c