iio: light: ltr501: Factor out core of write_raw() where direct mode claim is held.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 9 Mar 2025 17:06:22 +0000 (17:06 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 22 Apr 2025 18:09:56 +0000 (19:09 +0100)
commit5a7387f208e55ab33f389e3eb1584dd873c40acb
treea0f24048a6a9b248c3477d5752279555083c1e00
parent05e50a1da59261873e9033d7f96ed9fdbe9e28e0
iio: light: ltr501: Factor out core of write_raw() where direct mode claim is held.

Factoring this code out allows for direct returns on error simplifying code
flow.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250309170633.1347476-8-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/ltr501.c