]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: aspeed_adc: use devm_regulator_get_enable_read_voltage()
authorDavid Lechner <dlechner@baylibre.com>
Fri, 21 Jun 2024 22:11:48 +0000 (17:11 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 25 Jun 2024 20:04:50 +0000 (21:04 +0100)
commit9a36aa0f36ab17819d8cb0974f18f32d0fcef2e8
tree14d1ee7af5611ad9ede87940776f0be061dc614c
parentbb78ad627659fc7a738356951999f2ba79e68059
iio: adc: aspeed_adc: use devm_regulator_get_enable_read_voltage()

This makes use of the devm_regulator_get_enable_read_voltage() helper
function to simplify the code.

The error return is moved closer to the function call to make it easier
to follow the logic. And a few blank lines are added for readability.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Link: https://patch.msgid.link/20240621-iio-regulator-refactor-round-2-v1-1-49e50cd0b99a@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/aspeed_adc.c