iio: adc: ti-ads8344: convert probe to device-managed
authorAlexandru Ardelean <aardelean@deviqon.com>
Fri, 3 Sep 2021 07:37:07 +0000 (10:37 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 14 Sep 2021 11:00:34 +0000 (12:00 +0100)
commit9cec9be7af21a8f70f12d94e3b9ab85c08f96d36
tree94c63cf4356a7eba65c58f9122e4d646ff2ef62c
parent874b4912d94ffe2d01dc0a8c8a3ebf2c05c3ac29
iio: adc: ti-ads8344: convert probe to device-managed

This change converts the driver to register via devm_iio_device_register().
The regulator disable is moved on a devm_add_action_or_reset() hook.

And the spi_set_drvdata() isn't required anymore.
And finally, the ads8344_remove() can be removed as well.

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