iio: accel: dmard10: convert probe to device-managed functions
authorAlexandru Ardelean <aardelean@deviqon.com>
Wed, 30 Jun 2021 12:15:09 +0000 (15:15 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 17 Jul 2021 17:52:52 +0000 (18:52 +0100)
commit689f584b9858393809dc28046a7b51f9535d913d
tree2cf567ba89fce44bdb9107675333faed54dbbc02
parent148da125a0c825aa1576602391d6eece6568226f
iio: accel: dmard10: convert probe to device-managed functions

This is another simple conversion to device-managed functions, requiring
the use of devm_iio_device_register() and moving the disabling of the
device on a devm_add_action_or_reset() hook.

The i2c_set_clientdata() can be removed, as the PM functions can work with
just the device object, to obtain the i2c_client object.

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