]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
iio: position: iqs624: remove usage of iio_priv_to_dev()
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Fri, 22 May 2020 06:53:22 +0000 (09:53 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 14 Jun 2020 10:49:11 +0000 (11:49 +0100)
commit4de87f45ce0f1359a8220079924fa9d61961d764
tree3077cdd9936867df0c2e1b82cba9cecad22760ef
parent6dc855647c992d5e5f893a3680a893776efb2d9e
iio: position: iqs624: 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 iio_priv_to_dev() also means keeping a reference
on the state struct.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Acked-by: Jeff LaBundy <jeff@labundy.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/position/iqs624-pos.c