]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6c81737252b472fdd0ec4ce5b5bc6cc4364bceca
treeadd23cec8b7768e69701e79e3370d742908c231f
parent0ab809cc94198f50cfeefb06497f1f77ff88b20b
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