staging: iio: ad9834: convert to device-managed functions in probe
authorAlexandru Ardelean <aardelean@deviqon.com>
Wed, 10 Mar 2021 09:51:31 +0000 (11:51 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 25 Mar 2021 19:13:51 +0000 (19:13 +0000)
commitb627e3b5f73b8decc3ebfe46d93b23ecf6f143ab
tree0593d9ab334f784c5b8614b572fb57da830a6cc5
parent70da64153123460a10f3cb53fa9edca3a0ec2727
staging: iio: ad9834: convert to device-managed functions in probe

This change converts the driver to use device-managed functions in the
probe function. For the clock and regulator disable, some
devm_add_action_or_reset() calls are required, and then
devm_iio_device_register() function can be used register the IIO device.

The final aim here would be for IIO to export only the device-managed
functions of it's API. That's a long way to go and this a small step in
that direction.

Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210310095131.47476-1-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/frequency/ad9834.c