diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2012-04-30 16:06:12 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-30 10:28:10 -0400 |
commit | f316983fe033ba090b2f82fb9912aae9412d2372 (patch) | |
tree | 3dcad9cfcf17303aeb0b8341c8254e3fe534ffe6 /drivers/staging/iio/adc/ad799x_ring.c | |
parent | 949fd38c7b22168bc16fea100a51c8d4a3eab144 (diff) | |
download | linux-f316983fe033ba090b2f82fb9912aae9412d2372.tar.gz linux-f316983fe033ba090b2f82fb9912aae9412d2372.tar.bz2 linux-f316983fe033ba090b2f82fb9912aae9412d2372.zip |
staging: iio: adc: convert ADI drivers to use kfifo.
sw_ring is depreciated and therefore won't move out of staging.
Prerequisite for lifting affected drivers is to convert them to kfifo.
Update copyright.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/iio/adc/ad799x_ring.c')
-rw-r--r-- | drivers/staging/iio/adc/ad799x_ring.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/iio/adc/ad799x_ring.c b/drivers/staging/iio/adc/ad799x_ring.c index 18366b5038ce..1c7ff4423db4 100644 --- a/drivers/staging/iio/adc/ad799x_ring.c +++ b/drivers/staging/iio/adc/ad799x_ring.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Michael Hennerich, Analog Devices Inc. + * Copyright (C) 2010-2012 Michael Hennerich, Analog Devices Inc. * Copyright (C) 2008-2010 Jonathan Cameron * * This program is free software; you can redistribute it and/or modify @@ -18,7 +18,7 @@ #include <linux/iio/iio.h> #include <linux/iio/buffer.h> -#include "../ring_sw.h" +#include <linux/iio/kfifo_buf.h> #include <linux/iio/trigger_consumer.h> #include "ad799x.h" @@ -120,7 +120,7 @@ int ad799x_register_ring_funcs_and_init(struct iio_dev *indio_dev) { int ret = 0; - indio_dev->buffer = iio_sw_rb_allocate(indio_dev); + indio_dev->buffer = iio_kfifo_allocate(indio_dev); if (!indio_dev->buffer) { ret = -ENOMEM; goto error_ret; @@ -134,7 +134,7 @@ int ad799x_register_ring_funcs_and_init(struct iio_dev *indio_dev) indio_dev->id); if (indio_dev->pollfunc == NULL) { ret = -ENOMEM; - goto error_deallocate_sw_rb; + goto error_deallocate_kfifo; } /* Ring buffer functions - here trigger setup related */ @@ -145,8 +145,8 @@ int ad799x_register_ring_funcs_and_init(struct iio_dev *indio_dev) indio_dev->modes |= INDIO_BUFFER_TRIGGERED; return 0; -error_deallocate_sw_rb: - iio_sw_rb_free(indio_dev->buffer); +error_deallocate_kfifo: + iio_kfifo_free(indio_dev->buffer); error_ret: return ret; } @@ -154,5 +154,5 @@ error_ret: void ad799x_ring_cleanup(struct iio_dev *indio_dev) { iio_dealloc_pollfunc(indio_dev->pollfunc); - iio_sw_rb_free(indio_dev->buffer); + iio_kfifo_free(indio_dev->buffer); } |