summaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac
diff options
context:
space:
mode:
authorAlexandru Ardelean <alexandru.ardelean@analog.com>2020-05-25 16:10:34 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-06-14 11:49:47 +0100
commit723151a2401afdcee4f53ae92775902b58ee0469 (patch)
tree5aa955a3ed37a7fb10939d4218f719ab43b27b2e /drivers/iio/dac
parent812a46b7ff8f77f44ad3d9867b3525b4e0804f70 (diff)
downloadlinux-723151a2401afdcee4f53ae92775902b58ee0469.tar.bz2
iio: dac: ad5592r: remove usage of iio_priv_to_dev() helper
This was partially removed when the mlock cleanup was done. Only one more call is left in the ad5592r_alloc_channels() function. This one is simple. We just need to pass the iio_dev object and get the state via iio_priv(). Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/dac')
-rw-r--r--drivers/iio/dac/ad5592r-base.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-base.c
index 7402f67a551d..49daf0eee4e4 100644
--- a/drivers/iio/dac/ad5592r-base.c
+++ b/drivers/iio/dac/ad5592r-base.c
@@ -508,11 +508,11 @@ static void ad5592r_setup_channel(struct iio_dev *iio_dev,
chan->ext_info = ad5592r_ext_info;
}
-static int ad5592r_alloc_channels(struct ad5592r_state *st)
+static int ad5592r_alloc_channels(struct iio_dev *iio_dev)
{
+ struct ad5592r_state *st = iio_priv(iio_dev);
unsigned i, curr_channel = 0,
num_channels = st->num_channels;
- struct iio_dev *iio_dev = iio_priv_to_dev(st);
struct iio_chan_spec *channels;
struct fwnode_handle *child;
u32 reg, tmp;
@@ -636,7 +636,7 @@ int ad5592r_probe(struct device *dev, const char *name,
if (ret)
goto error_disable_reg;
- ret = ad5592r_alloc_channels(st);
+ ret = ad5592r_alloc_channels(iio_dev);
if (ret)
goto error_disable_reg;