iio: temperature: tmp007: use device-managed functions in probe
authorAlexandru Ardelean <aardelean@deviqon.com>
Wed, 10 Mar 2021 09:38:00 +0000 (11:38 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 25 Mar 2021 19:13:51 +0000 (19:13 +0000)
commit70da64153123460a10f3cb53fa9edca3a0ec2727
treeadd23cec8b7768e69701e79e3370d742908c231f
parent218bc53dc70022ac31381b43c82f4097a95b8605
iio: temperature: tmp007: use device-managed functions in probe

This change converts the driver to use device-managed functions in the
probe function. The power-down call is handled now via a
devm_add_action_or_reset() hook, and then devm_iio_device_register() can be
used to 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/20210310093800.45822-1-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/temperature/tmp007.c