Searched hist:"6 a25893cb0e255ab8888d6a4f40e8d1e9d554ad0" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/iio/dac/ |
H A D | max5821.c | diff 6a25893cb0e255ab8888d6a4f40e8d1e9d554ad0 Sat Jul 24 17:02:00 CDT 2021 Théo Borém Fabris <theobf@usp.br> 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>
|