diff options
Diffstat (limited to 'drivers/staging/iio/dac/ad5624r_spi.c')
-rw-r--r-- | drivers/staging/iio/dac/ad5624r_spi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/iio/dac/ad5624r_spi.c b/drivers/staging/iio/dac/ad5624r_spi.c index 2d2c946..284d8790 100644 --- a/drivers/staging/iio/dac/ad5624r_spi.c +++ b/drivers/staging/iio/dac/ad5624r_spi.c @@ -288,11 +288,12 @@ static int __devexit ad5624r_remove(struct spi_device *spi) struct iio_dev *indio_dev = spi_get_drvdata(spi); struct ad5624r_state *st = iio_priv(indio_dev); + iio_device_unregister(indio_dev); if (!IS_ERR(st->reg)) { regulator_disable(st->reg); regulator_put(st->reg); } - iio_device_unregister(indio_dev); + iio_free_device(indio_dev); return 0; } |