commit | 93e33d703030fe0348c1ff9d8f40bc6c2d82dc30 | [log] [tgz] |
---|---|---|
author | Lars-Peter Clausen <lars@metafoo.de> | Mon Sep 10 09:34:00 2012 +0100 |
committer | Jonathan Cameron <jic23@kernel.org> | Thu Sep 13 20:25:49 2012 +0100 |
tree | d413d688dc86f19ead5f8b24b91d8ea5153fb6c2 | |
parent | fcc7800b652e55420b85d1c885f39e8a230ace59 [diff] |
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: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>