iio: humidity: hts221: remove usage of iio_priv_to_dev()
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Fri, 22 May 2020 06:56:16 +0000 (09:56 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 14 Jun 2020 10:49:13 +0000 (11:49 +0100)
commit7d17577d49d68310aba991d7954b385478fda6c4
tree9c1a8adc5b77c9327fe372dee89e7b1b05d001bc
parent4de87f45ce0f1359a8220079924fa9d61961d764
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>
drivers/iio/humidity/hts221.h
drivers/iio/humidity/hts221_buffer.c
drivers/iio/humidity/hts221_core.c