Skip to content
Commit 6a25893c authored by Théo Borém Fabris's avatar Théo Borém Fabris Committed by Jonathan Cameron
Browse files

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: default avatarThéo Borém Fabris <theobf@usp.br>
Reviewed-by: default avatarAlexandru Ardelean <ardeleanalex@gmail.com>
Link: https://lore.kernel.org/r/20210724220159.11998-1-theobf@usp.br


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent eaaa23d7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment