]> git.baikalelectronics.ru Git - kernel.git/commit
media: videobuf2-v4l2: Expose vb2_queue_is_busy() to drivers
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 18 Mar 2022 17:44:35 +0000 (18:44 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 09:02:21 +0000 (11:02 +0200)
commit71cec5224c2b7558a2f125895adacab094847de2
tree0a79d4dacf58ec703fb85ee1bebd4e6c0b3fbb02
parent9a1bc892357326a75b1726a3686752e04b572086
media: videobuf2-v4l2: Expose vb2_queue_is_busy() to drivers

vb2 queue ownership is managed by the ioctl handler helpers
(vb2_ioctl_*). There are however use cases where drivers can benefit
from checking queue ownership, for instance when open-coding an ioctl
handler that needs to perform additional checks before calling the
corresponding vb2 operation.

Expose the vb2_queue_is_busy() function in the videobuf2-v4l2.h header,
and change its first argument to a struct vb2_queue pointer as the
function name implies it operates on a queue, not a video_device.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/common/videobuf2/videobuf2-v4l2.c
include/media/videobuf2-v4l2.h