Skip to content

Commit d020ca1

Browse files
committed
media: samples: v4l2-pci-skeleton.c: drop vb2_ops_wait_prepare/finish
Since commit 8878598 ("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>
1 parent 3576f81 commit d020ca1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

samples/v4l/v4l2-pci-skeleton.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,18 +269,14 @@ static void stop_streaming(struct vb2_queue *vq)
269269
}
270270

271271
/*
272-
* The vb2 queue ops. Note that since q->lock is set we can use the standard
273-
* vb2_ops_wait_prepare/finish helper functions. If q->lock would be NULL,
274-
* then this driver would have to provide these ops.
272+
* The vb2 queue ops.
275273
*/
276274
static const struct vb2_ops skel_qops = {
277275
.queue_setup = queue_setup,
278276
.buf_prepare = buffer_prepare,
279277
.buf_queue = buffer_queue,
280278
.start_streaming = start_streaming,
281279
.stop_streaming = stop_streaming,
282-
.wait_prepare = vb2_ops_wait_prepare,
283-
.wait_finish = vb2_ops_wait_finish,
284280
};
285281

286282
/*

0 commit comments

Comments
 (0)