summaryrefslogtreecommitdiff
path: root/include/linux/iio/common
diff options
context:
space:
mode:
authorAlexandru Ardelean <aardelean@deviqon.com>2021-08-23 14:22:02 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-09-14 12:00:31 +0100
commit5363c6c17b1014f696bf0b2984af4b694062ce8f (patch)
tree5d7d2fee4cf5b10a9251c4c7ae39aac7ed1a8dcd /include/linux/iio/common
parent82bcb7fb649844a561ff1ac2e2ace4252bdff793 (diff)
iio: st_sensors: remove st_sensors_power_disable() function
This change converts the st_sensors_power_enable() function to use devm_add_action_or_reset() handlers to register regulator_disable hooks for when the drivers get unloaded. The parent device of the IIO device object is used. This is based on the assumption that all other devm_ calls in the ST sensors use this reference. This makes the st_sensors_power_disable() un-needed. Removing this also changes unload order a bit, as all ST drivers would call st_sensors_power_disable() first and iio_device_unregister() after that. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210823112204.243255-4-aardelean@deviqon.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/iio/common')
-rw-r--r--include/linux/iio/common/st_sensors.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h
index e74b55244f35..fc90c202d15e 100644
--- a/include/linux/iio/common/st_sensors.h
+++ b/include/linux/iio/common/st_sensors.h
@@ -293,8 +293,6 @@ int st_sensors_set_axis_enable(struct iio_dev *indio_dev, u8 axis_enable);
int st_sensors_power_enable(struct iio_dev *indio_dev);
-void st_sensors_power_disable(struct iio_dev *indio_dev);
-
int st_sensors_debugfs_reg_access(struct iio_dev *indio_dev,
unsigned reg, unsigned writeval,
unsigned *readval);