aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/dac/ad5686.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c
index 17aca4d9bd06..f57562aa396f 100644
--- a/drivers/iio/dac/ad5686.c
+++ b/drivers/iio/dac/ad5686.c
@@ -313,7 +313,7 @@ static int ad5686_probe(struct spi_device *spi)
313{ 313{
314 struct ad5686_state *st; 314 struct ad5686_state *st;
315 struct iio_dev *indio_dev; 315 struct iio_dev *indio_dev;
316 int ret, regdone = 0, voltage_uv = 0; 316 int ret, voltage_uv = 0;
317 317
318 indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); 318 indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
319 if (indio_dev == NULL) 319 if (indio_dev == NULL)
@@ -355,7 +355,6 @@ static int ad5686_probe(struct spi_device *spi)
355 indio_dev->channels = st->chip_info->channel; 355 indio_dev->channels = st->chip_info->channel;
356 indio_dev->num_channels = AD5686_DAC_CHANNELS; 356 indio_dev->num_channels = AD5686_DAC_CHANNELS;
357 357
358 regdone = 1;
359 ret = ad5686_spi_write(st, AD5686_CMD_INTERNAL_REFER_SETUP, 0, 358 ret = ad5686_spi_write(st, AD5686_CMD_INTERNAL_REFER_SETUP, 0,
360 !!voltage_uv, 0); 359 !!voltage_uv, 0);
361 if (ret) 360 if (ret)