summaryrefslogtreecommitdiffstats
path: root/drivers/media/test-drivers/vivid/vivid-vbi-cap.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2021-04-12 13:02:10 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-06-08 12:04:36 +0200
commit2d8b2a6431b38f4cb4046636117940b0cb0b3ecf (patch)
tree2353a7b55796cfc126d90cd19af5720954ec9d44 /drivers/media/test-drivers/vivid/vivid-vbi-cap.c
parentmedia: videobuf2-v4l2.c: add vb2_queue_change_type() helper (diff)
downloadlinux-2d8b2a6431b38f4cb4046636117940b0cb0b3ecf.tar.xz
linux-2d8b2a6431b38f4cb4046636117940b0cb0b3ecf.zip
media: vivid: remove stream_sliced_vbi_cap field
Vivid tracks the VBI capture mode in vivid_dev->stream_sliced_vbi_cap field. We can just look at the buffer type instead, and drop the field. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/test-drivers/vivid/vivid-vbi-cap.c')
-rw-r--r--drivers/media/test-drivers/vivid/vivid-vbi-cap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/test-drivers/vivid/vivid-vbi-cap.c b/drivers/media/test-drivers/vivid/vivid-vbi-cap.c
index 1a9348eea781..387df4ff01b0 100644
--- a/drivers/media/test-drivers/vivid/vivid-vbi-cap.c
+++ b/drivers/media/test-drivers/vivid/vivid-vbi-cap.c
@@ -255,9 +255,8 @@ int vidioc_s_fmt_vbi_cap(struct file *file, void *priv,
if (ret)
return ret;
- if (dev->stream_sliced_vbi_cap && vb2_is_busy(&dev->vb_vbi_cap_q))
+ if (f->type != V4L2_BUF_TYPE_VBI_CAPTURE && vb2_is_busy(&dev->vb_vbi_cap_q))
return -EBUSY;
- dev->stream_sliced_vbi_cap = false;
dev->vbi_cap_dev.queue->type = V4L2_BUF_TYPE_VBI_CAPTURE;
return 0;
}
@@ -322,10 +321,9 @@ int vidioc_s_fmt_sliced_vbi_cap(struct file *file, void *fh, struct v4l2_format
if (ret)
return ret;
- if (!dev->stream_sliced_vbi_cap && vb2_is_busy(&dev->vb_vbi_cap_q))
+ if (fmt->type != V4L2_BUF_TYPE_SLICED_VBI_CAPTURE && vb2_is_busy(&dev->vb_vbi_cap_q))
return -EBUSY;
dev->service_set_cap = vbi->service_set;
- dev->stream_sliced_vbi_cap = true;
dev->vbi_cap_dev.queue->type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
return 0;
}