iio: dac: mcp4922: use devm_regulator_get_enable_read_voltage()
authorDavid Lechner <dlechner@baylibre.com>
Fri, 12 Jul 2024 16:03:54 +0000 (11:03 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 3 Aug 2024 09:13:38 +0000 (10:13 +0100)
commitba2b35841ce9b0cdba125c7f16fb15416258040b
treed390a9da8ec3795a8d5b5d433888a77c31b8f677
parent475da4ee1494eaa70075571b74431c86a20fac23
iio: dac: mcp4922: 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 MCP4922 DAC driver.

The error message is slightly different because there is only one error
return path now.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20240712-iio-regulator-refactor-round-3-v1-3-835017bae43d@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/dac/mcp4922.c