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.comSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Showing
Please register or sign in to comment