iio: adc: max1118: Avoid jumping back and forth between spi and iio structures
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 16 May 2021 17:25:16 +0000 (18:25 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 3 Jun 2021 17:24:14 +0000 (18:24 +0100)
commit3c43b6e108d5fc94dd38638b561ac55a661c3adf
treeefb1c124cfb5e6be56036a9ff3d3a3f3f0e6de7f
parent30b527dd4fc50db0490d8e3e30b37cafd6302cf7
iio: adc: max1118: Avoid jumping back and forth between spi and iio structures

Changing from passing the spi structure into various functions to
passing struct iio_dev avoids use of spi_get_drvdata and lets us
stop setting that at all.  Previous code was unnecessarily complex.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210516172520.1398835-5-jic23@kernel.org
drivers/iio/adc/max1118.c