]> git.baikalelectronics.ru Git - kernel.git/commit
iio: __iio_update_buffers: Perform request_update() only for new buffers
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 13 May 2015 14:04:46 +0000 (16:04 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 17 May 2015 09:01:45 +0000 (10:01 +0100)
commit5424da1bc415df98ee97a360f086ff99fd30dd8c
tree3f9eee25a554fa6447b9c10f57eda656853ebab9
parent2a37f7681821d444981aaf5ab214f0ce135ce0bb
iio: __iio_update_buffers: Perform request_update() only for new buffers

We only have to call the request_update() callback for a newly inserted
buffer. The configuration of the already previously active buffers will not
have changed.

This also allows us to move the request_update() call to the beginning of
__iio_update_buffers(), before any currently active buffers are stopped.
This makes the error handling a lot easier since no changes were made to
the buffer list and no rollback needs to be performed.

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