diff options
Diffstat (limited to 'drivers/staging/iio/dac')
-rw-r--r-- | drivers/staging/iio/dac/ad5624r_spi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/iio/dac/ad5624r_spi.c b/drivers/staging/iio/dac/ad5624r_spi.c index 7303bb1..c4bdf42 100644 --- a/drivers/staging/iio/dac/ad5624r_spi.c +++ b/drivers/staging/iio/dac/ad5624r_spi.c @@ -262,12 +262,12 @@ static int __devinit ad5624r_probe(struct spi_device *spi) indio_dev->info = &ad5624r_info; indio_dev->modes = INDIO_DIRECT_MODE; - ret = iio_device_register(indio_dev); + ret = ad5624r_spi_write(spi, AD5624R_CMD_INTERNAL_REFER_SETUP, 0, + !!voltage_uv, 16); if (ret) goto error_free_dev; - ret = ad5624r_spi_write(spi, AD5624R_CMD_INTERNAL_REFER_SETUP, 0, - !!voltage_uv, 16); + ret = iio_device_register(indio_dev); if (ret) goto error_free_dev; |