Commit d01e5a4d authored by Hans Verkuil's avatar Hans Verkuil
Browse files

media: test-drivers: drop vb2_ops_wait_prepare/finish



Since commit 88785982 ("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: default avatarHans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 1d8aaa86
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1688,8 +1688,6 @@ static const struct vb2_ops vicodec_qops = {
	.buf_request_complete	= vicodec_buf_request_complete,
	.start_streaming	= vicodec_start_streaming,
	.stop_streaming		= vicodec_stop_streaming,
	.wait_prepare		= vb2_ops_wait_prepare,
	.wait_finish		= vb2_ops_wait_finish,
};

static int queue_init(void *priv, struct vb2_queue *src_vq,
+0 −2
Original line number Diff line number Diff line
@@ -1100,8 +1100,6 @@ static const struct vb2_ops vim2m_qops = {
	.buf_queue	 = vim2m_buf_queue,
	.start_streaming = vim2m_start_streaming,
	.stop_streaming  = vim2m_stop_streaming,
	.wait_prepare	 = vb2_ops_wait_prepare,
	.wait_finish	 = vb2_ops_wait_finish,
	.buf_request_complete = vim2m_buf_request_complete,
};

+0 −6
Original line number Diff line number Diff line
@@ -326,12 +326,6 @@ static const struct vb2_ops vimc_capture_qops = {
	.buf_queue		= vimc_capture_buf_queue,
	.queue_setup		= vimc_capture_queue_setup,
	.buf_prepare		= vimc_capture_buffer_prepare,
	/*
	 * Since q->lock is set we can use the standard
	 * vb2_ops_wait_prepare/finish helper functions.
	 */
	.wait_prepare		= vb2_ops_wait_prepare,
	.wait_finish		= vb2_ops_wait_finish,
};

static const struct media_entity_operations vimc_capture_mops = {
+0 −2
Original line number Diff line number Diff line
@@ -732,8 +732,6 @@ static const struct vb2_ops visl_qops = {
	.buf_queue            = visl_buf_queue,
	.start_streaming      = visl_start_streaming,
	.stop_streaming       = visl_stop_streaming,
	.wait_prepare         = vb2_ops_wait_prepare,
	.wait_finish          = vb2_ops_wait_finish,
	.buf_request_complete = visl_buf_request_complete,
};

+0 −2
Original line number Diff line number Diff line
@@ -122,8 +122,6 @@ const struct vb2_ops vivid_meta_cap_qops = {
	.start_streaming	= meta_cap_start_streaming,
	.stop_streaming		= meta_cap_stop_streaming,
	.buf_request_complete	= meta_cap_buf_request_complete,
	.wait_prepare		= vb2_ops_wait_prepare,
	.wait_finish		= vb2_ops_wait_finish,
};

int vidioc_enum_fmt_meta_cap(struct file *file, void  *priv,
Loading