diff mbox series

[10/10] media: samples: v4l2-pci-skeleton.c: drop vb2_ops_wait_prepare/finish

Message ID 20241014-vb2-wait-v1-10-8c3ee25c618c@xs4all.nl
State Accepted
Commit d020ca11a816a99f87f2d186e137a9fb2341adb3
Headers show
Series media: start work to remove wait_prepare/finish callbacks | expand

Commit Message

Hans Verkuil Oct. 14, 2024, 3:06 p.m. UTC
Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish
are NULL") it is no longer needed to set the wait_prepare/finish
vb2_ops callbacks as long as the lock field in vb2_queue is set.

Since the vb2_ops_wait_prepare/finish callbacks already rely on that field,
we can safely drop these callbacks.

This simplifies the code and this is a step towards the goal of deleting
these callbacks.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
---
 samples/v4l/v4l2-pci-skeleton.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/samples/v4l/v4l2-pci-skeleton.c b/samples/v4l/v4l2-pci-skeleton.c
index 4fc2063b9f595ff3b4579bab7692790a53f689c3..d709d82800cdb80ddb9b41d0009c1c93ef0955e3 100644
--- a/samples/v4l/v4l2-pci-skeleton.c
+++ b/samples/v4l/v4l2-pci-skeleton.c
@@ -269,9 +269,7 @@  static void stop_streaming(struct vb2_queue *vq)
 }
 
 /*
- * The vb2 queue ops. Note that since q->lock is set we can use the standard
- * vb2_ops_wait_prepare/finish helper functions. If q->lock would be NULL,
- * then this driver would have to provide these ops.
+ * The vb2 queue ops.
  */
 static const struct vb2_ops skel_qops = {
 	.queue_setup		= queue_setup,
@@ -279,8 +277,6 @@  static const struct vb2_ops skel_qops = {
 	.buf_queue		= buffer_queue,
 	.start_streaming	= start_streaming,
 	.stop_streaming		= stop_streaming,
-	.wait_prepare		= vb2_ops_wait_prepare,
-	.wait_finish		= vb2_ops_wait_finish,
 };
 
 /*