iio: adc: max1363: simplify using devm_regulator_get_enable()
authorMatti Vaittinen <mazziesaccount@gmail.com>
Fri, 19 Aug 2022 19:20:47 +0000 (22:20 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 23 Nov 2022 19:44:01 +0000 (19:44 +0000)
commit3dfa1d4f63baf41774bbc77467729de39e0ac8a6
tree974aeb97d35d044630171e4e3c64adfa4fa7d5a9
parentf55c8e6696425ef22b7d08fc05b920d3a1a5dbf6
iio: adc: max1363: 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: Matti Vaittinen <mazziesaccount@gmail.com>
Acked-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/1286ea127d190e5708a0aaff271819b2d3f8802d.1660934107.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/max1363.c