iio: Add helper function for calculating scan index storage size
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 2 Feb 2016 15:27:24 +0000 (16:27 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 6 Feb 2016 18:21:35 +0000 (18:21 +0000)
commit182b49058e036573ccea37619d90fcaddc983536
treedda1009aac923b9fc6760644980b16ab9d5bf421
parent713bbb4efb9dcda2e96c8338db1f21c68f2d822a
iio: Add helper function for calculating scan index storage size

We have the same code for computing the scan index storage size in bytes
all over the place. Factor this out into helper functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/industrialio-buffer.c