iio: adc: ad7791: convert to device-managed functions
authorAlexandru Ardelean <aardelean@deviqon.com>
Thu, 13 May 2021 12:07:47 +0000 (15:07 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 13 Jun 2021 16:00:16 +0000 (17:00 +0100)
commitbb560edc19a535b690b81fd30d17462d129483a3
tree9bfb96c1176a6cb4fa7ea3db7e5bd2dc5e56d5dc
parent801a80eff4d71081a29ddfb627fe5a0330403c3b
iio: adc: ad7791: convert to device-managed functions

With the devm_ad_sd_setup_buffer_and_trigger() helper, it's a bit easier
now to convert the probe of the AD7791 driver to use device-managed
functions.

Only the regulator disable requires a devm_add_action_or_reset() callback.

This change does that, cleaning up the driver a bit.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210513120752.90074-8-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7791.c