Re: [PATCH 04/27] iio: Add iio_push_buffers_with_timestamp() helper

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

 



On 09/16/13 09:19, Lars-Peter Clausen wrote:
> On 09/16/2013 09:58 AM, Peter Meerwald wrote:
>>
>>> Interesting.  Whilst this obviouslby results in the removal of a lot of
>>> repeated code, I am nervous about introducing the 'hidden' requirement
>>> that the data buffer passed in must be bigger than is 'apparently' used
>>> in the code calling this. I'm not sure what the right answer is though.
>>
>> maybe add some iio magic that always allocs the buffer dynamically based 
>> on the channel definition/scan_bytes
> 
> A lot of drivers already do something like priv_data->buffer =
> kzalloc(indio_dev->scan_bytes, ...) in their update_scan_mode callback.
> Maybe we can add a transfer_buffer field to the iio_dev struct and have a
> function that can be used as a default update_scan_mode callback that
> allocates the buffer.
That would probably make sense and remove quite a lot of my concern about these.
Can happen as a later patch set though.

Jonathan
--
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