From patchwork Fri Mar 18 21:14:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 553267 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E528C433F5 for ; Fri, 18 Mar 2022 21:15:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241072AbiCRVQg (ORCPT ); Fri, 18 Mar 2022 17:16:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240986AbiCRVQf (ORCPT ); Fri, 18 Mar 2022 17:16:35 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87AA7D4456; Fri, 18 Mar 2022 14:15:16 -0700 (PDT) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D3E182E0; Fri, 18 Mar 2022 22:15:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1647638110; bh=jOMgpOzP4ODIcbwU/EUMFmGOgnpTrrsAmm0wdppi+lk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bzLCjgMXNuYPwend069aKxp4siTbkVRiiW3+UcU7aMnCjW68vbJBmUQANbiZpJGgY p92/vuBVUlUG/WHAM0WZHbBHCBSoNQNOFrkBN9JHmWVzRTXDxTgZh7T26l8Wg+6KMF 6tPH5i5UUDPwiW2d78u2q8crDteflMQdE2iLIAbE= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Tomasz Figa , Marek Szyprowski , Hans Verkuil , Kieran Bingham Subject: [PATCH 3/3] media: vsp1: Use vb2_queue_is_busy() Date: Fri, 18 Mar 2022 23:14:46 +0200 Message-Id: <20220318211446.11543-4-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220318211446.11543-1-laurent.pinchart+renesas@ideasonboard.com> References: <20220318211446.11543-1-laurent.pinchart+renesas@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Use the new vb2_queue_is_busy() helper to replace the open-coded version. Signed-off-by: Laurent Pinchart --- drivers/media/platform/renesas/vsp1/vsp1_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/renesas/vsp1/vsp1_video.c b/drivers/media/platform/renesas/vsp1/vsp1_video.c index 8f53abc71db2..4da70b2b0869 100644 --- a/drivers/media/platform/renesas/vsp1/vsp1_video.c +++ b/drivers/media/platform/renesas/vsp1/vsp1_video.c @@ -1032,7 +1032,7 @@ vsp1_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) struct vsp1_pipeline *pipe; int ret; - if (video->queue.owner && video->queue.owner != file->private_data) + if (vb2_queue_is_busy(&video->queue, file)) return -EBUSY; /*