iio: adc: da9150-gpadc: convert probe to full-device managed
authorAlexandru Ardelean <aardelean@deviqon.com>
Fri, 3 Sep 2021 07:29:17 +0000 (10:29 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 19 Oct 2021 07:27:34 +0000 (08:27 +0100)
commitfb6349effb7e09757e7fa3d115711009f9330275
treee47152630bccf2ad67a34ecb526dcba62a3d1b0a
parent9c22f459cc413db4b7164f35eb99010d9284b4bb
iio: adc: da9150-gpadc: convert probe to full-device managed

This change converts the probe of this driver to use device-managed
functions only, which means that the remove hook can be removed.
The remove hook has only 2 calls to iio_device_unregister() and
iio_map_array_unregister(). Both these can now be done via devm register
functions, now that there's also a devm_iio_map_array_register() function.

The platform_set_drvdata() can also be removed now.

This change also removes the error print for when the iio_device_register()
call fails. This isn't required now.

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