media: v4l2-mem2mem: use vb2_is_streaming()
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 8 Dec 2022 07:51:32 +0000 (08:51 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 6 Feb 2023 08:00:41 +0000 (09:00 +0100)
Don't touch q->streaming directly, use the vb2_is_streaming()
function instead.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/v4l2-core/v4l2-mem2mem.c

index be7fde1ed3eaac17eeea7f668da4150664cd532d..0cc30397fbad5f199f9e23615c4daa83197ab7bb 100644 (file)
@@ -922,9 +922,9 @@ static __poll_t v4l2_m2m_poll_for_data(struct file *file,
         * means either in driver already or waiting for driver to claim it
         * and start processing.
         */
-       if ((!src_q->streaming || src_q->error ||
+       if ((!vb2_is_streaming(src_q) || src_q->error ||
             list_empty(&src_q->queued_list)) &&
-           (!dst_q->streaming || dst_q->error ||
+           (!vb2_is_streaming(dst_q) || dst_q->error ||
             (list_empty(&dst_q->queued_list) && !dst_q->last_buffer_dequeued)))
                return EPOLLERR;