Commit 0d331e4f authored by Jonathan Cameron's avatar Jonathan Cameron

staging:iio:adc:max1363 ring_sw->kfifo conversion

We are moving towards scrapping ring_sw so this move
is necessary.
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 92d1079b
...@@ -149,7 +149,7 @@ config MAX1363_RING_BUFFER ...@@ -149,7 +149,7 @@ config MAX1363_RING_BUFFER
bool "Maxim max1363: use ring buffer" bool "Maxim max1363: use ring buffer"
depends on MAX1363 depends on MAX1363
select IIO_BUFFER select IIO_BUFFER
select IIO_SW_RING select IIO_KFIFO_BUF
help help
Say yes here to include ring buffer support in the MAX1363 Say yes here to include ring buffer support in the MAX1363
ADC driver. ADC driver.
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <linux/iio/iio.h> #include <linux/iio/iio.h>
#include <linux/iio/buffer.h> #include <linux/iio/buffer.h>
#include "../ring_sw.h" #include <linux/iio/kfifo_buf.h>
#include <linux/iio/trigger_consumer.h> #include <linux/iio/trigger_consumer.h>
#include "max1363.h" #include "max1363.h"
...@@ -101,7 +101,7 @@ int max1363_register_ring_funcs_and_init(struct iio_dev *indio_dev) ...@@ -101,7 +101,7 @@ int max1363_register_ring_funcs_and_init(struct iio_dev *indio_dev)
struct max1363_state *st = iio_priv(indio_dev); struct max1363_state *st = iio_priv(indio_dev);
int ret = 0; int ret = 0;
indio_dev->buffer = iio_sw_rb_allocate(indio_dev); indio_dev->buffer = iio_kfifo_allocate(indio_dev);
if (!indio_dev->buffer) { if (!indio_dev->buffer) {
ret = -ENOMEM; ret = -ENOMEM;
goto error_ret; goto error_ret;
...@@ -126,7 +126,7 @@ int max1363_register_ring_funcs_and_init(struct iio_dev *indio_dev) ...@@ -126,7 +126,7 @@ int max1363_register_ring_funcs_and_init(struct iio_dev *indio_dev)
return 0; return 0;
error_deallocate_sw_rb: error_deallocate_sw_rb:
iio_sw_rb_free(indio_dev->buffer); iio_kfifo_free(indio_dev->buffer);
error_ret: error_ret:
return ret; return ret;
} }
...@@ -135,5 +135,5 @@ void max1363_ring_cleanup(struct iio_dev *indio_dev) ...@@ -135,5 +135,5 @@ void max1363_ring_cleanup(struct iio_dev *indio_dev)
{ {
/* ensure that the trigger has been detached */ /* ensure that the trigger has been detached */
iio_dealloc_pollfunc(indio_dev->pollfunc); iio_dealloc_pollfunc(indio_dev->pollfunc);
iio_sw_rb_free(indio_dev->buffer); iio_kfifo_free(indio_dev->buffer);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment