staging:iio:ad7606: Factor out common code between periodic and one-shot capture
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 19 Oct 2016 17:07:02 +0000 (19:07 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 23 Oct 2016 18:34:15 +0000 (19:34 +0100)
commit91b7334bae734586b153a79fd82873c5d00eb950
treefdf141bafecfaad19aa2597fd168b862f98c8d39
parentf915f7aafba79784b8d89cf186fd63d3b16b91b9
staging:iio:ad7606: Factor out common code between periodic and one-shot capture

Both the periodic buffer based and one-shot sysfs based capture methods
share a large portion of their code. Factor this out into a common helper
function.

Also provide a comment that better explains in more detail what is going on
in the capture function.

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