iio: adc: ad7192: Simplify using devm_regulator_get_enable()
authorMatti Vaittinen <mazziesaccount@gmail.com>
Fri, 19 Aug 2022 19:19:01 +0000 (22:19 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 10:03:09 +0000 (12:03 +0200)
commitee1d783be55d19ef913fe949b5192fa76dcc41c1
tree3cd2f13987be1a23819887472557785919893ccf
parent3b02dbd1cd54d6184b904ea17ee664ba15186a77
iio: adc: ad7192: Simplify using devm_regulator_get_enable()

[ Upstream commit 1ccef2e6e9205e209ad958d2e591bcca60981007 ]

Use devm_regulator_get_enable() instead of open coded get, enable,
add-action-to-disable-at-detach - pattern. Also drop the seemingly unused
struct member 'dvdd'.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/9719c445c095d3d308e2fc9f4f93294f5806c41c.1660934107.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Stable-dep-of: 7e7dcab620cd ("iio: adc: ad7192: Correct reference voltage")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/adc/ad7192.c