Skip to content
Commit fd5b6c48 authored by Matti Vaittinen's avatar Matti Vaittinen Committed by Jonathan Cameron
Browse files

iio: adc: ad7606: simplify using devm_regulator_get_enable()



Drop open-coded pattern: 'devm_regulator_get(), regulator_enable(),
add_action_or_reset(regulator_disable)' and use the
devm_regulator_get_enable() and drop the pointer to the regulator.
This simplifies code and makes it less tempting to add manual control
for the regulator which is also controlled by devm.

Whilst here also switch to dev_err_probe() to provide more information
if a deferred probe occurs.

Signed-off-by: default avatarMatti Vaittinen <mazziesaccount@gmail.com>
Acked-by: default avatarNuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/521c52f5a9bdc2db04d5775b36df4b233ae338da.1660934107.git.mazziesaccount@gmail.com


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