diff options
Diffstat (limited to 'drivers/staging/iio/accel/adis16240_core.c')
-rw-r--r-- | drivers/staging/iio/accel/adis16240_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/iio/accel/adis16240_core.c b/drivers/staging/iio/accel/adis16240_core.c index ee1e873..b8be292 100644 --- a/drivers/staging/iio/accel/adis16240_core.c +++ b/drivers/staging/iio/accel/adis16240_core.c @@ -589,10 +589,11 @@ static int adis16240_remove(struct spi_device *spi) flush_scheduled_work(); + iio_device_unregister(indio_dev); adis16240_remove_trigger(indio_dev); iio_buffer_unregister(indio_dev); adis16240_unconfigure_ring(indio_dev); - iio_device_unregister(indio_dev); + iio_free_device(indio_dev); return 0; } |