From: Lars-Peter Clausen Date: Mon, 10 Sep 2012 08:34:00 +0000 (+0100) Subject: staging:iio:ad7476: Avoid alloc/free for each sample in buffered mode X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~75^2~161^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93e33d703030fe0348c1ff9d8f40bc6c2d82dc30;p=pandora-kernel.git 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 Signed-off-by: Jonathan Cameron --- Reading git-diff-tree failed