Re: iio_buffer_register arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/04/2012 01:30 PM, Manuel Stahl wrote:
> Hi,
> 
> I have a short question about the arguments of iio_buffer_register. Are they really needed?
> When we look at this code from lis3l02dq_core.c:
> 
> 	indio_dev->channels = lis3l02dq_channels;
> 	indio_dev->num_channels = ARRAY_SIZE(lis3l02dq_channels);
> 
> 	<zip>
> 
> 	ret = iio_buffer_register(indio_dev,
> 				  lis3l02dq_channels,
> 				  ARRAY_SIZE(lis3l02dq_channels));
> 
> The needed info is already available in indio_dev...
> 

It might even cause problems if we pass another set of channels to
iio_buffer_register as we assign to the indio_dev. So it properly is a good
idea to update the function to only take the indio_dev as a parameter.

- Lars
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux