diff options
author | Théo Borém Fabris <theobf@usp.br> | 2021-07-24 19:02:00 -0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-07-31 18:17:22 +0100 |
commit | 6a25893cb0e255ab8888d6a4f40e8d1e9d554ad0 (patch) | |
tree | 00f3601c0758410e8f293b133271601b88391ffc /drivers/iio/adc | |
parent | dt-bindings: iio/adc: ingenic: add the JZ4760(B) socs to the sadc Documentation (diff) | |
download | linux-dev-6a25893cb0e255ab8888d6a4f40e8d1e9d554ad0.tar.xz linux-dev-6a25893cb0e255ab8888d6a4f40e8d1e9d554ad0.zip |
iio: dac: max5821: convert device register to device managed function
Add a device managed hook, via devm_add_action_or_reset() and
max5821_regulator_disable(), to disable voltage regulator on device
detach.
Replace iio_device_register() by devm_iio_device_register() and remove
the max5821_remove() function used to unregister the device and disable the
voltage regulator.
Remove i2c_set_clientdata() from the probe function, since
i2c_get_clientdata() is not used anymore.
Remove regulator_disable() calls from the probe function.
Signed-off-by: Théo Borém Fabris <theobf@usp.br>
Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Link: https://lore.kernel.org/r/20210724220159.11998-1-theobf@usp.br
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc')
0 files changed, 0 insertions, 0 deletions