|
@@ -1277,7 +1277,7 @@ static int sca3000_configure_ring(struct iio_dev *indio_dev)
|
|
|
{
|
|
|
struct iio_buffer *buffer;
|
|
|
|
|
|
- buffer = iio_kfifo_allocate();
|
|
|
+ buffer = devm_iio_kfifo_allocate(&indio_dev->dev);
|
|
|
if (!buffer)
|
|
|
return -ENOMEM;
|
|
|
|
|
@@ -1287,11 +1287,6 @@ static int sca3000_configure_ring(struct iio_dev *indio_dev)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static void sca3000_unconfigure_ring(struct iio_dev *indio_dev)
|
|
|
-{
|
|
|
- iio_kfifo_free(indio_dev->buffer);
|
|
|
-}
|
|
|
-
|
|
|
static inline
|
|
|
int __sca3000_hw_ring_state_set(struct iio_dev *indio_dev, bool state)
|
|
|
{
|
|
@@ -1546,8 +1541,6 @@ static int sca3000_remove(struct spi_device *spi)
|
|
|
if (spi->irq)
|
|
|
free_irq(spi->irq, indio_dev);
|
|
|
|
|
|
- sca3000_unconfigure_ring(indio_dev);
|
|
|
-
|
|
|
return 0;
|
|
|
}
|
|
|
|