Commit 26560d94 authored by David Lechner's avatar David Lechner Committed by Jonathan Cameron
Browse files

iio: adc: mcp3911: use devm_regulator_get_enable_read_voltage()



This makes use of the new devm_regulator_get_enable_read_voltage()
helper function to reduce boilerplate code in the MCP3911 ADC driver.

The error message is slightly changed since there are fewer error
return paths.

An extra parameter is added to the config callback to avoid adding
state that is not used outside of the probe() function.

Signed-off-by: default avatarDavid Lechner <dlechner@baylibre.com>
Reviewed-by: default avatarMarcus Folkesson <marcus.folkesson@gmail.com>
Link: https://patch.msgid.link/20240712-iio-regulator-refactor-round-3-v1-6-835017bae43d@baylibre.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent f2e3fbc4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment