]> git.ipfire.org Git - thirdparty/linux.git/commit
iio: dac: ad5686: use devm_regulator_get_enable_read_voltage()
authorDavid Lechner <dlechner@baylibre.com>
Wed, 20 Nov 2024 21:33:26 +0000 (15:33 -0600)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 7 Dec 2024 17:47:35 +0000 (17:47 +0000)
commit6c009e55924a7a103925091af0811c3553ca27e9
treea7209e235d3dd5fee40373b45fdb1352ea748653
parentf596651dd6beb37b0f90e21ec245a3bc7c84557b
iio: dac: ad5686: use devm_regulator_get_enable_read_voltage()

Simplify the code by using devm_regulator_get_enable_read_voltage().

There is a small change in behavior. Before, all errors from
devm_regulator_get_optional() were ignored and assumed to mean that
the external reference supply was absent. Now, only -ENODEV is checked
and other errors will cause a failure to probe. So now, this will
catch errors, like using the wrong data type for the devicetree
property.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20241120-iio-regulator-cleanup-round-6-v1-3-d5a5360f7ec3@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/dac/ad5686-spi.c
drivers/iio/dac/ad5686.c
drivers/iio/dac/ad5686.h
drivers/iio/dac/ad5696-i2c.c