iio: stm32-dfsdm-adc: remove usage of iio_priv_to_dev() helper
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Mon, 25 May 2020 08:26:48 +0000 (11:26 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 20 Jun 2020 16:26:21 +0000 (17:26 +0100)
commit07b6c9dc4651831f7184aae25a4a9aa701811afc
treeff65e7f432f050bff0b0811c82e1a9e108693f94
parentd18ffd83745a7491ba1057cb382d33a877d51e2a
iio: stm32-dfsdm-adc: remove usage of iio_priv_to_dev() helper

We may want to get rid of the iio_priv_to_dev() helper. 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.
The iio_priv() helper won't be affected by the rework, as the iio_dev
struct will keep a reference to the private information.

For this driver, not using iio_priv_to_dev(), means reworking some paths to
pass the iio device and using iio_priv() to access the private information.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/stm32-dfsdm-adc.c