iio: amplifier: hmc425a: simplify using devm_regulator_get_enable()
authorMatti Vaittinen <mazziesaccount@gmail.com>
Fri, 19 Aug 2022 19:21:02 +0000 (22:21 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 23 Nov 2022 19:44:01 +0000 (19:44 +0000)
commit563746c26db6c203d30bed2daa301416b27b77fb
tree297c0433b33430bf11aa652da89ddccf3bd0a3cd
parent3dfa1d4f63baf41774bbc77467729de39e0ac8a6
iio: amplifier: hmc425a: 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/8b1193fdefb231a6d721e2bded52c48e56039c20.1660934107.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/amplifiers/hmc425a.c