From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH 4/5] staging:iio:imu: adis16400 switch from sw_ring to kfifo
Date: Fri, 30 Nov 2012 14:58:04 +0000 [thread overview]
Message-ID: <50B8C97C.7020200@kernel.org> (raw)
In-Reply-To: <50B8C441.1040407@metafoo.de>
On 11/30/2012 02:35 PM, Lars-Peter Clausen wrote:
> On 11/30/2012 03:22 PM, Jonathan Cameron wrote:
>> sw ring is going away so switch over to kfifo based buffer implementation.
>> The only real change is that poll will return on some data there rather than
>> buffer 50% full.
>>
>> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
>
> Is is ok for you to drop this one and wait with the last patch in the series
> still a bit? I've patches to switch this driver over to the adislib and this
> patch would probably introduce a couple of conflicts.
>
> The rest of the series looks good.
*laughs* I guessed as much, but decided it was quicker to write the patch and
have you request I hold it than to send you an email to ask if you had such a
patch and then wait for the response.
Should have known you'd get back almost instantly.
These are very much for the next cycle, so I am happy to do as you
requested!
>
> Thanks,
> - Lars
>
>> ---
>> drivers/staging/iio/imu/Kconfig | 2 +-
>> drivers/staging/iio/imu/adis16400_ring.c | 12 ++++++------
>> 2 files changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/staging/iio/imu/Kconfig b/drivers/staging/iio/imu/Kconfig
>> index 2c2f47d..b9d9c14 100644
>> --- a/drivers/staging/iio/imu/Kconfig
>> +++ b/drivers/staging/iio/imu/Kconfig
>> @@ -6,7 +6,7 @@ menu "Inertial measurement units"
>> config ADIS16400
>> tristate "Analog Devices ADIS16400 and similar IMU SPI driver"
>> depends on SPI
>> - select IIO_SW_RING if IIO_BUFFER
>> + select IIO_KFIFO_BUF if IIO_BUFFER
>> select IIO_TRIGGER if IIO_BUFFER
>> help
>> Say yes here to build support for Analog Devices adis16300, adis16344,
>> diff --git a/drivers/staging/iio/imu/adis16400_ring.c b/drivers/staging/iio/imu/adis16400_ring.c
>> index d46c1e3..319c2c0 100644
>> --- a/drivers/staging/iio/imu/adis16400_ring.c
>> +++ b/drivers/staging/iio/imu/adis16400_ring.c
>> @@ -7,7 +7,7 @@
>> #include <linux/export.h>
>>
>> #include <linux/iio/iio.h>
>> -#include "../ring_sw.h"
>> +#include <linux/iio/kfifo_buf.h>
>> #include <linux/iio/trigger_consumer.h>
>> #include "adis16400.h"
>>
>> @@ -161,7 +161,7 @@ done:
>> void adis16400_unconfigure_ring(struct iio_dev *indio_dev)
>> {
>> iio_dealloc_pollfunc(indio_dev->pollfunc);
>> - iio_sw_rb_free(indio_dev->buffer);
>> + iio_kfifo_free(indio_dev->buffer);
>> }
>>
>> static const struct iio_buffer_setup_ops adis16400_ring_setup_ops = {
>> @@ -175,7 +175,7 @@ int adis16400_configure_ring(struct iio_dev *indio_dev)
>> int ret = 0;
>> struct iio_buffer *ring;
>>
>> - ring = iio_sw_rb_allocate(indio_dev);
>> + ring = iio_kfifo_allocate(indio_dev);
>> if (!ring) {
>> ret = -ENOMEM;
>> return ret;
>> @@ -193,12 +193,12 @@ int adis16400_configure_ring(struct iio_dev *indio_dev)
>> indio_dev->id);
>> if (indio_dev->pollfunc == NULL) {
>> ret = -ENOMEM;
>> - goto error_iio_sw_rb_free;
>> + goto error_iio_kfifo_free;
>> }
>>
>> indio_dev->modes |= INDIO_BUFFER_TRIGGERED;
>> return 0;
>> -error_iio_sw_rb_free:
>> - iio_sw_rb_free(indio_dev->buffer);
>> +error_iio_kfifo_free:
>> + iio_kfifo_free(indio_dev->buffer);
>> return ret;
>> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2012-11-30 14:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-30 14:22 [PATCH 0/5] staging:iio: drop sw_ring buffer implementation Jonathan Cameron
2012-11-30 14:22 ` [PATCH 1/5] staging:iio:accel:lis3l02dq remove sw_ring support Jonathan Cameron
2012-11-30 14:22 ` [PATCH 2/5] staging:iio:impedance-analyzer switch from sw_ring to kfifo Jonathan Cameron
2012-11-30 14:22 ` [PATCH 3/5] staging:iio:meter:ade7758 " Jonathan Cameron
2012-11-30 14:22 ` [PATCH 4/5] staging:iio:imu: adis16400 " Jonathan Cameron
2012-11-30 14:35 ` Lars-Peter Clausen
2012-11-30 14:58 ` Jonathan Cameron [this message]
2012-11-30 14:22 ` [PATCH 5/5] staging:iio: drop sw_ring buffer implementation Jonathan Cameron
2013-01-19 13:49 ` [PATCH 0/5] " Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50B8C97C.7020200@kernel.org \
--to=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).