staging:iio:ad7887: Preallocate sample buffer
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 5 Nov 2012 09:56:00 +0000 (09:56 +0000)
committerJonathan Cameron <jic23@kernel.org>
Mon, 5 Nov 2012 20:39:51 +0000 (20:39 +0000)
commitbd6880477a3d73270edead88f4b806504998e5d8
tree700423605c971c504d1bfb027d5d53975a271300
parent3c7f0c2b1150eae8683a98a5a9143d81edfc2762
staging:iio:ad7887: Preallocate sample buffer

We know that the sample buffer will at most need to hold two 16 bit samples and
the 64 bit aligned 64 bit timestamp. Preallocate a buffer large enough to hold
this instead of allocating and freeing it each time a sample is read.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/ad7887.h
drivers/staging/iio/adc/ad7887_ring.c