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

iio: adc: max1241: 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.

Signed-off-by: default avatarMatti Vaittinen <mazziesaccount@gmail.com>
Acked-by: default avatarAlexandru Lazar <alazar@startmail.com>
Link: https://lore.kernel.org/r/7c759bf6c06e72ae70bffeebc1939d9903427278.1660934107.git.mazziesaccount@gmail.com


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