media: videobuf2-core: update vb2_thread if wait_finish/prepare are NULL
The vb2_thread is used for DVB support. This will queue and dequeue buffers automatically. It calls wait_finish/prepare around vb2_core_dqbuf() and vb2_core_qbuf(), but that assumes all drivers have these ops set. But that will change due to commit 88785982 ("media: vb2: use lock if wait_prepare/finish are NULL"). So instead just check if the callback is available, and if not, use q->lock, just as __vb2_wait_for_done_vb() does. Signed-off-by:Hans Verkuil <hverkuil@xs4all.nl> Reviewed-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Loading
Please register or sign in to comment