Skip to content

Commit d01e5a4

Browse files
committed
media: test-drivers: 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> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent 1d8aaa8 commit d01e5a4

File tree

12 files changed

+0
-28
lines changed

12 files changed

+0
-28
lines changed

drivers/media/test-drivers/vicodec/vicodec-core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,8 +1688,6 @@ static const struct vb2_ops vicodec_qops = {
16881688
.buf_request_complete = vicodec_buf_request_complete,
16891689
.start_streaming = vicodec_start_streaming,
16901690
.stop_streaming = vicodec_stop_streaming,
1691-
.wait_prepare = vb2_ops_wait_prepare,
1692-
.wait_finish = vb2_ops_wait_finish,
16931691
};
16941692

16951693
static int queue_init(void *priv, struct vb2_queue *src_vq,

drivers/media/test-drivers/vim2m.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,8 +1100,6 @@ static const struct vb2_ops vim2m_qops = {
11001100
.buf_queue = vim2m_buf_queue,
11011101
.start_streaming = vim2m_start_streaming,
11021102
.stop_streaming = vim2m_stop_streaming,
1103-
.wait_prepare = vb2_ops_wait_prepare,
1104-
.wait_finish = vb2_ops_wait_finish,
11051103
.buf_request_complete = vim2m_buf_request_complete,
11061104
};
11071105

drivers/media/test-drivers/vimc/vimc-capture.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,6 @@ static const struct vb2_ops vimc_capture_qops = {
326326
.buf_queue = vimc_capture_buf_queue,
327327
.queue_setup = vimc_capture_queue_setup,
328328
.buf_prepare = vimc_capture_buffer_prepare,
329-
/*
330-
* Since q->lock is set we can use the standard
331-
* vb2_ops_wait_prepare/finish helper functions.
332-
*/
333-
.wait_prepare = vb2_ops_wait_prepare,
334-
.wait_finish = vb2_ops_wait_finish,
335329
};
336330

337331
static const struct media_entity_operations vimc_capture_mops = {

drivers/media/test-drivers/visl/visl-video.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,8 +732,6 @@ static const struct vb2_ops visl_qops = {
732732
.buf_queue = visl_buf_queue,
733733
.start_streaming = visl_start_streaming,
734734
.stop_streaming = visl_stop_streaming,
735-
.wait_prepare = vb2_ops_wait_prepare,
736-
.wait_finish = vb2_ops_wait_finish,
737735
.buf_request_complete = visl_buf_request_complete,
738736
};
739737

drivers/media/test-drivers/vivid/vivid-meta-cap.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ const struct vb2_ops vivid_meta_cap_qops = {
122122
.start_streaming = meta_cap_start_streaming,
123123
.stop_streaming = meta_cap_stop_streaming,
124124
.buf_request_complete = meta_cap_buf_request_complete,
125-
.wait_prepare = vb2_ops_wait_prepare,
126-
.wait_finish = vb2_ops_wait_finish,
127125
};
128126

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

drivers/media/test-drivers/vivid/vivid-meta-out.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ const struct vb2_ops vivid_meta_out_qops = {
122122
.start_streaming = meta_out_start_streaming,
123123
.stop_streaming = meta_out_stop_streaming,
124124
.buf_request_complete = meta_out_buf_request_complete,
125-
.wait_prepare = vb2_ops_wait_prepare,
126-
.wait_finish = vb2_ops_wait_finish,
127125
};
128126

129127
int vidioc_enum_fmt_meta_out(struct file *file, void *priv,

drivers/media/test-drivers/vivid/vivid-sdr-cap.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,6 @@ const struct vb2_ops vivid_sdr_cap_qops = {
337337
.start_streaming = sdr_cap_start_streaming,
338338
.stop_streaming = sdr_cap_stop_streaming,
339339
.buf_request_complete = sdr_cap_buf_request_complete,
340-
.wait_prepare = vb2_ops_wait_prepare,
341-
.wait_finish = vb2_ops_wait_finish,
342340
};
343341

344342
int vivid_sdr_enum_freq_bands(struct file *file, void *fh,

drivers/media/test-drivers/vivid/vivid-touch-cap.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ const struct vb2_ops vivid_touch_cap_qops = {
110110
.start_streaming = touch_cap_start_streaming,
111111
.stop_streaming = touch_cap_stop_streaming,
112112
.buf_request_complete = touch_cap_buf_request_complete,
113-
.wait_prepare = vb2_ops_wait_prepare,
114-
.wait_finish = vb2_ops_wait_finish,
115113
};
116114

117115
int vivid_enum_fmt_tch(struct file *file, void *priv, struct v4l2_fmtdesc *f)

drivers/media/test-drivers/vivid/vivid-vbi-cap.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,6 @@ const struct vb2_ops vivid_vbi_cap_qops = {
230230
.start_streaming = vbi_cap_start_streaming,
231231
.stop_streaming = vbi_cap_stop_streaming,
232232
.buf_request_complete = vbi_cap_buf_request_complete,
233-
.wait_prepare = vb2_ops_wait_prepare,
234-
.wait_finish = vb2_ops_wait_finish,
235233
};
236234

237235
int vidioc_g_fmt_vbi_cap(struct file *file, void *priv,

drivers/media/test-drivers/vivid/vivid-vbi-out.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ const struct vb2_ops vivid_vbi_out_qops = {
128128
.start_streaming = vbi_out_start_streaming,
129129
.stop_streaming = vbi_out_stop_streaming,
130130
.buf_request_complete = vbi_out_buf_request_complete,
131-
.wait_prepare = vb2_ops_wait_prepare,
132-
.wait_finish = vb2_ops_wait_finish,
133131
};
134132

135133
int vidioc_g_fmt_vbi_out(struct file *file, void *priv,

0 commit comments

Comments
 (0)