Skip to content

Commit 723151a

Browse files
commodoJonathan Cameron
authored andcommitted
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>
1 parent 812a46b commit 723151a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/iio/dac/ad5592r-base.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,11 @@ static void ad5592r_setup_channel(struct iio_dev *iio_dev,
508508
chan->ext_info = ad5592r_ext_info;
509509
}
510510

511-
static int ad5592r_alloc_channels(struct ad5592r_state *st)
511+
static int ad5592r_alloc_channels(struct iio_dev *iio_dev)
512512
{
513+
struct ad5592r_state *st = iio_priv(iio_dev);
513514
unsigned i, curr_channel = 0,
514515
num_channels = st->num_channels;
515-
struct iio_dev *iio_dev = iio_priv_to_dev(st);
516516
struct iio_chan_spec *channels;
517517
struct fwnode_handle *child;
518518
u32 reg, tmp;
@@ -636,7 +636,7 @@ int ad5592r_probe(struct device *dev, const char *name,
636636
if (ret)
637637
goto error_disable_reg;
638638

639-
ret = ad5592r_alloc_channels(st);
639+
ret = ad5592r_alloc_channels(iio_dev);
640640
if (ret)
641641
goto error_disable_reg;
642642

0 commit comments

Comments
 (0)