OSDN Git Service

iio: adc: ad7923: use devm_add_action_or_reset for regulator disable
authorLucas Stankus <lucas.p.stankus@gmail.com>
Sun, 28 Mar 2021 21:46:04 +0000 (18:46 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 29 Mar 2021 11:17:41 +0000 (12:17 +0100)
commit44fc4de9bd61ca2c7f5215df5321457af3bece24
treec59d8b2da9be4361f0b9fc39632343f026d8bf3c
parentabfdfd144357e6f555db234f6a64498423a4322a
iio: adc: ad7923: use devm_add_action_or_reset for regulator disable

Adds a device-managed action to handle disabling the driver's regulator on
device detach.
This slightly simplifies deinitialization and enables further conversion of
the driver to device-managed routines without breaking the init order.

Signed-off-by: Lucas Stankus <lucas.p.stankus@gmail.com>
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Link: https://lore.kernel.org/r/49a7c0436ca1186313dbccf3d810d0cf38cb5b37.1616966903.git.lucas.p.stankus@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7923.c