iio: buffer-dma: Get rid of outgoing queue
authorPaul Cercueil <paul@crapouillou.net>
Tue, 19 Dec 2023 17:50:02 +0000 (18:50 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 21 Dec 2023 11:28:47 +0000 (11:28 +0000)
commitee9ec49046951eff704752669f0c388b506ddbdf
treecd7f0055c6516559244993863224021f42e111cc
parent4bb104e4f30d2202657b77c948f9ef1366ac438e
iio: buffer-dma: Get rid of outgoing queue

The buffer-dma code was using two queues, incoming and outgoing, to
manage the state of the blocks in use.

While this totally works, it adds some complexity to the code,
especially since the code only manages 2 blocks. It is much easier to
just check each block's state manually, and keep a counter for the next
block to dequeue.

Since the new DMABUF based API wouldn't use the outgoing queue anyway,
getting rid of it now makes the upcoming changes simpler.

With this change, the IIO_BLOCK_STATE_DEQUEUED is now useless, and can
be removed.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20231219175009.65482-2-paul@crapouillou.net
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/buffer/industrialio-buffer-dma.c
include/linux/iio/buffer-dma.h