]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: ad7192: use devm_regulator_get_enable_read_voltage
authorDavid Lechner <dlechner@baylibre.com>
Mon, 24 Jun 2024 12:49:36 +0000 (15:49 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 30 Jun 2024 09:38:50 +0000 (10:38 +0100)
commit0d2775c18b5d7bfa33bddb575b88e53c4cfdf644
tree8cc150bf78b455dff4a406147327186455130df2
parenta3c2c5c937ed7562b6d120670f2743e979c05881
iio: adc: ad7192: use devm_regulator_get_enable_read_voltage

This makes use of the new devm_regulator_get_enable_read_voltage()
function to reduce boilerplate code.

Error messages have changed slightly since there are now fewer places
where we print an error. The rest of the logic of selecting which
supply to use as the reference voltage remains the same.

Also 1000 is replaced by MILLI in a few places for consistency.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20240624124941.113010-2-alisa.roman@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7192.c