Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] IIO-onwards: ADC: AD7476: Fix ringbuffer registration
@ 2011-04-15  9:27 michael.hennerich
  2011-04-15 13:05 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: michael.hennerich @ 2011-04-15  9:27 UTC (permalink / raw)
  To: jic23; +Cc: linux-iio, drivers, device-drivers-devel, Michael Hennerich

From: Michael Hennerich <michael.hennerich@analog.com>


Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
---
 drivers/staging/iio/adc/ad7476_core.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/iio/adc/ad7476_core.c b/drivers/staging/iio/adc/ad7476_core.c
index 5867b92..a3cd4cd 100644
--- a/drivers/staging/iio/adc/ad7476_core.c
+++ b/drivers/staging/iio/adc/ad7476_core.c
@@ -209,7 +209,9 @@ static int __devinit ad7476_probe(struct spi_device *spi)
 	if (ret)
 		goto error_free_device;
 
-	ret = iio_ring_buffer_register(st->indio_dev->ring, 0);
+	ret = iio_ring_buffer_register_ex(st->indio_dev->ring, 0,
+			(struct iio_chan_spec *) st->chip_info->channel,
+			ARRAY_SIZE(st->chip_info->channel));
 	if (ret)
 		goto error_cleanup_ring;
 	return 0;
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] IIO-onwards: ADC: AD7476: Fix ringbuffer registration
  2011-04-15  9:27 [PATCH] IIO-onwards: ADC: AD7476: Fix ringbuffer registration michael.hennerich
@ 2011-04-15 13:05 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2011-04-15 13:05 UTC (permalink / raw)
  To: michael.hennerich; +Cc: linux-iio, drivers, device-drivers-devel

On 04/15/11 10:27, michael.hennerich@analog.com wrote:
> From: Michael Hennerich <michael.hennerich@analog.com>
> 
Thanks, merged into rebase of tree.  The type cast is no unnecessary
as I've constified inputs to iio_ring_buffer_register_ex
(that was in the branch I accidentally didn't push last night!)

> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
> ---
>  drivers/staging/iio/adc/ad7476_core.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/staging/iio/adc/ad7476_core.c b/drivers/staging/iio/adc/ad7476_core.c
> index 5867b92..a3cd4cd 100644
> --- a/drivers/staging/iio/adc/ad7476_core.c
> +++ b/drivers/staging/iio/adc/ad7476_core.c
> @@ -209,7 +209,9 @@ static int __devinit ad7476_probe(struct spi_device *spi)
>  	if (ret)
>  		goto error_free_device;
>  
> -	ret = iio_ring_buffer_register(st->indio_dev->ring, 0);
> +	ret = iio_ring_buffer_register_ex(st->indio_dev->ring, 0,
> +			(struct iio_chan_spec *) st->chip_info->channel,
> +			ARRAY_SIZE(st->chip_info->channel));
>  	if (ret)
>  		goto error_cleanup_ring;
>  	return 0;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-15 13:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-15  9:27 [PATCH] IIO-onwards: ADC: AD7476: Fix ringbuffer registration michael.hennerich
2011-04-15 13:05 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox