]> git.baikalelectronics.ru Git - kernel.git/commit
iio: __iio_update_buffers: Split enable and disable path into helper functions
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 18 May 2015 11:34:48 +0000 (13:34 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sat, 23 May 2015 11:44:34 +0000 (12:44 +0100)
commit9eab759e902f5ce182deeb053c2607e2cb26ea46
treeae91fde9752af1146d67e578bad3c94d8113a43e
parent028fedd57cb9cbb690a02d5034b0a4cd871b4762
iio: __iio_update_buffers: Split enable and disable path into helper functions

__iio_update_buffers is already a rather large function with many different
error paths and it is going to get even larger. This patch factors out the
device enable and device disable paths into separate helper functions.

The patch also re-implements iio_disable_all_buffers() using the new
iio_disable_buffers() function removing a fair bit of redundant code.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/industrialio-buffer.c