From 032658a446145b9e6af7f90521179a9e0111b546 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Fri, 30 Nov 2012 14:22:00 +0000 Subject: [PATCH] staging:iio:impedance-analyzer switch from sw_ring to kfifo. sw_ring buffer implementation is going away so switch to the kfifo based alternative. Signed-off-by: Jonathan Cameron --- drivers/staging/iio/impedance-analyzer/Kconfig | 2 +- drivers/staging/iio/impedance-analyzer/ad5933.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/iio/impedance-analyzer/Kconfig b/drivers/staging/iio/impedance-analyzer/Kconfig index ad0ff765e4b2..dd97b6bb3fd0 100644 --- a/drivers/staging/iio/impedance-analyzer/Kconfig +++ b/drivers/staging/iio/impedance-analyzer/Kconfig @@ -7,7 +7,7 @@ config AD5933 tristate "Analog Devices AD5933, AD5934 driver" depends on I2C select IIO_BUFFER - select IIO_SW_RING + select IIO_KFIFO_BUF help Say yes here to build support for Analog Devices Impedance Converter, Network Analyzer, AD5933/4, provides direct access via sysfs. diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c index 779243d24dec..440e2261e8cb 100644 --- a/drivers/staging/iio/impedance-analyzer/ad5933.c +++ b/drivers/staging/iio/impedance-analyzer/ad5933.c @@ -22,7 +22,7 @@ #include #include #include -#include "../ring_sw.h" +#include #include "ad5933.h" @@ -630,7 +630,7 @@ static const struct iio_buffer_setup_ops ad5933_ring_setup_ops = { static int ad5933_register_ring_funcs_and_init(struct iio_dev *indio_dev) { - indio_dev->buffer = iio_sw_rb_allocate(indio_dev); + indio_dev->buffer = iio_kfifo_allocate(indio_dev); if (!indio_dev->buffer) return -ENOMEM; @@ -774,7 +774,7 @@ static int ad5933_probe(struct i2c_client *client, error_uninitialize_ring: iio_buffer_unregister(indio_dev); error_unreg_ring: - iio_sw_rb_free(indio_dev->buffer); + iio_kfifo_free(indio_dev->buffer); error_disable_reg: if (!IS_ERR(st->reg)) regulator_disable(st->reg); @@ -794,7 +794,7 @@ static int ad5933_remove(struct i2c_client *client) iio_device_unregister(indio_dev); iio_buffer_unregister(indio_dev); - iio_sw_rb_free(indio_dev->buffer); + iio_kfifo_free(indio_dev->buffer); if (!IS_ERR(st->reg)) { regulator_disable(st->reg); regulator_put(st->reg); -- 2.30.2