iio: pressure: ms5611: Use devm_regulator_get_enable()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 16 Oct 2022 16:34:08 +0000 (17:34 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 28 Dec 2022 17:19:45 +0000 (17:19 +0000)
commit122ef59a2a16e4542705913b905d841704e239e9
treec3d8bcfa3337dacc730c13ca9a571d676bfb31bf
parent4da9438d293d30def46b2801fa00e176c59883d2
iio: pressure: ms5611: Use devm_regulator_get_enable()

This driver only turns the power on at probe and off at remove.
The new devm_regulator_get_enable() replaces this boilerplate code.
Some additional refactoring to drop now unnecessary unwinding after
this change.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Tomasz Duszynski <tduszyns@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/20221016163409.320197-14-jic23@kernel.org
drivers/iio/pressure/ms5611.h
drivers/iio/pressure/ms5611_core.c