Skip to content
Commit d272e0ab authored by Alexandru Ardelean's avatar Alexandru Ardelean Committed by Jonathan Cameron
Browse files

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: default avatarAlexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210624080641.9953-1-aardelean@deviqon.com


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