diff options
author | Alexandru Ardelean <alexandru.ardelean@analog.com> | 2020-05-22 08:56:16 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-06-14 12:49:13 +0200 |
commit | 7d17577d49d68310aba991d7954b385478fda6c4 (patch) | |
tree | 9c1a8adc5b77c9327fe372dee89e7b1b05d001bc /drivers/iio/humidity/hts221.h | |
parent | iio: position: iqs624: remove usage of iio_priv_to_dev() (diff) | |
download | linux-7d17577d49d68310aba991d7954b385478fda6c4.tar.xz linux-7d17577d49d68310aba991d7954b385478fda6c4.zip |
iio: humidity: hts221: remove usage of iio_priv_to_dev()
We may want to get rid of the iio_priv_to_dev() helper. That's a bit
uncertain at this point. The reason is that we will hide some of the
members of the iio_dev structure (to prevent drivers from accessing them
directly), and that will also mean hiding the implementation of the
iio_priv_to_dev() helper inside the IIO core.
Hiding the implementation of iio_priv_to_dev() implies that some fast-paths
may not be fast anymore, so a general idea is to try to get rid of the
iio_priv_to_dev() altogether.
For this driver, removing the iio_priv_to_dev() helper means passing the
iio_dev object on hts221_allocate_buffers() & hts221_allocate_trigger().
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/humidity/hts221.h')
-rw-r--r-- | drivers/iio/humidity/hts221.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/humidity/hts221.h b/drivers/iio/humidity/hts221.h index 7d6771f7cf47..7c650df77556 100644 --- a/drivers/iio/humidity/hts221.h +++ b/drivers/iio/humidity/hts221.h @@ -46,7 +46,7 @@ extern const struct dev_pm_ops hts221_pm_ops; int hts221_probe(struct device *dev, int irq, const char *name, struct regmap *regmap); int hts221_set_enable(struct hts221_hw *hw, bool enable); -int hts221_allocate_buffers(struct hts221_hw *hw); -int hts221_allocate_trigger(struct hts221_hw *hw); +int hts221_allocate_buffers(struct iio_dev *iio_dev); +int hts221_allocate_trigger(struct iio_dev *iio_dev); #endif /* HTS221_H */ |