aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio/adc/ad7768-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/adc/ad7768-1.c')
-rw-r--r--drivers/iio/adc/ad7768-1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c
index 60f21fed6dcb..2c5c8a3672b2 100644
--- a/drivers/iio/adc/ad7768-1.c
+++ b/drivers/iio/adc/ad7768-1.c
@@ -614,7 +614,6 @@ static int ad7768_probe(struct spi_device *spi)
st->mclk_freq = clk_get_rate(st->mclk);
- spi_set_drvdata(spi, indio_dev);
mutex_init(&st->lock);
indio_dev->channels = ad7768_channels;
@@ -630,7 +629,8 @@ static int ad7768_probe(struct spi_device *spi)
}
st->trig = devm_iio_trigger_alloc(&spi->dev, "%s-dev%d",
- indio_dev->name, indio_dev->id);
+ indio_dev->name,
+ iio_device_id(indio_dev));
if (!st->trig)
return -ENOMEM;