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
This commit is contained in:
Jonathan Cameron 2022-10-16 17:34:08 +01:00
commit 122ef59a2a
2 changed files with 5 additions and 30 deletions