Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d2b7497 authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Mauro Carvalho Chehab
Browse files

[media] s5p-mfc: use vb2_is_streaming() to check vb2 queue status



The streaming field in struct vb2_queue is meant to be private and should
not be used by drivers directly, instead the vb2_is_streaming() function
should be used to check the videobuf2 queue streaming status.

Signed-off-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: default avatarKamil Debski <k.debski@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent c8e913e1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -423,7 +423,7 @@ static int vidioc_s_fmt(struct file *file, void *priv, struct v4l2_format *f)
	pix_mp = &f->fmt.pix_mp;
	if (ret)
		return ret;
	if (ctx->vq_src.streaming || ctx->vq_dst.streaming) {
	if (vb2_is_streaming(&ctx->vq_src) || vb2_is_streaming(&ctx->vq_dst)) {
		v4l2_err(&dev->v4l2_dev, "%s queue busy\n", __func__);
		ret = -EBUSY;
		goto out;
@@ -820,7 +820,7 @@ static int vidioc_decoder_cmd(struct file *file, void *priv,
		if (cmd->flags != 0)
			return -EINVAL;

		if (!ctx->vq_src.streaming)
		if (!vb2_is_streaming(&ctx->vq_src))
			return -EINVAL;

		spin_lock_irqsave(&dev->irqlock, flags);