From patchwork Thu Jun 9 20:25:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 9167867 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8A55A607DA for ; Thu, 9 Jun 2016 20:27:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B9F528047 for ; Thu, 9 Jun 2016 20:27:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C3692835A; Thu, 9 Jun 2016 20:27:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E4E1028047 for ; Thu, 9 Jun 2016 20:27:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bB6WZ-0008KT-1r; Thu, 09 Jun 2016 20:25:55 +0000 Received: from lists.s-osg.org ([54.187.51.154]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bB6WV-0008HW-RX for linux-arm-kernel@lists.infradead.org; Thu, 09 Jun 2016 20:25:52 +0000 Received: from minerva.sisa.samsung.com (host-185.58.217.201.copaco.com.py [201.217.58.185]) by lists.s-osg.org (Postfix) with ESMTPSA id DF358E2798; Thu, 9 Jun 2016 13:26:14 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Subject: [PATCH] [media] s5p-mfc: use vb2_is_streaming() to check vb2 queue status Date: Thu, 9 Jun 2016 16:25:14 -0400 Message-Id: <1465503914-22936-1-git-send-email-javier@osg.samsung.com> X-Mailer: git-send-email 2.5.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160609_132551_933173_DE25063C X-CRM114-Status: UNSURE ( 9.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kamil Debski , Jeongtae Park , Mauro Carvalho Chehab , Javier Martinez Canillas , Kyungmin Park , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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: Javier Martinez Canillas --- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index 038215c198ac..d3b01e92ee80 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c @@ -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);