]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: accel: kx022a: Factor out guts of write_raw() to allow direct returns
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 Feb 2025 14:01:31 +0000 (14:01 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 4 Mar 2025 13:17:48 +0000 (13:17 +0000)
commit305f655d059d68d0e2973294eb9139eaba22e83c
tree2333e66260083a837c57d3a45885df07aae4881d
parent9ab72adb90392e23701db04da6103335d4176c9f
iio: accel: kx022a: Factor out guts of write_raw() to allow direct returns

Create a new utility function for the actions taken when direct mode
is held. This allows for direct returns, simplifying the code flow.

Cc: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250217140135.896574-5-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/kionix-kx022a.c