diff options
author | Alexandru Ardelean <aardelean@deviqon.com> | 2021-06-24 11:06:41 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-07-19 11:51:59 +0300 |
commit | d272e0ab5f4bcaf0a29e7606854cfb5a9b725758 (patch) | |
tree | 7ef26b6bf272d8cb08ae8a61ca8e2b8d749bff6e /drivers/iio/light/tcs3414.c | |
parent | c359a80ca29099be951a1fa5c7529792cadf3e8f (diff) | |
download | linux-d272e0ab5f4bcaf0a29e7606854cfb5a9b725758.tar.xz |
iio: potentiometer: max5481: convert probe to device-managed
The change converts the probe function to use the
devm_iio_device_register() function.
Before calling that, we need to register an action to store the wiper back
to non-volatile memory when the device is de-registered.
We don't need to do this if the probe fails, because the only place where
the probe can fail now is devm_iio_device_register() and that shouldn't
create an IIO device (for userspace to poke at) if it fails.
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210624080641.9953-1-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/light/tcs3414.c')
0 files changed, 0 insertions, 0 deletions