Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 93e33d70 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron
Browse files

staging:iio:ad7476: Avoid alloc/free for each sample in buffered mode



The ad7476 driver has only support for 1 channel ADCs. So the upper limit for
the buffer size is the size of one sample plus the size of the timestamp.
Preallocate a buffer large enough to hold this to avoid having to allocate and
free a new buffer for each sample being captured.

Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent fcc7800b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment