From patchwork Thu Mar 3 15:36:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 12767646 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 21E1FC433EF for ; Thu, 3 Mar 2022 15:39:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1UbvWQpWwyKu3b+Vsc5ahInNGXFYmNdNgdjNRhfRLHo=; b=qcnIzpqdMLKJe8 siyoIXo2MORJnbD1rfRN0JEbVg4syFxHl+UZD79NGiyH88SLHeTAtE/QvtuV6dM6XyUnPhQDGdAgU Aacr1hoH6sFXM3vPo+kDKnSzbHN491o3auFTkkQjppb2ta7+SZUm+1kERKFfdNOsI+KopKdrIsMQq ZA++5v6NCkewhZN478evesvm6xt/m5v0ZzQJiqMSoAF3TT+uoQmDJBNAyMfwInEiV6iMFzA3rDiyg L8HMUkwBPbaCL62uhXgUQQsaYcnXqvTZNcjwd+uIrjYWP6OPy9Bo/VQXXhfCeeSWZ9JfFY2UPlAVi SjoL9MCj7xGp4zDoAqyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPnX6-006s6E-1c; Thu, 03 Mar 2022 15:38:25 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPnVd-006rap-FY for linux-arm-kernel@lists.infradead.org; Thu, 03 Mar 2022 15:36:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1646321813; x=1677857813; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ktAuPeikT5yIzQagKaEvWRybAOSvIjqqN73SIJDSJFk=; b=KB/bX83c+va8zVCODtM/PFp3ciJlBIT7c806LoEhigR3z6F8kDm9UGAZ nZogSnkj/o12lgJLGgX15n2XdG29JaXqW/zcyQAS28y/JdsU2gm5fe72v ZqIOwWEFI5OVFs+upIFGsIh2p0GtXgSisYxFz/DJb5y5C/G8xft+vZryh mRIq7hV1aTs5lJmvxb6pp0cdq+Af76jIyi4/Dj5oFr4P9NPmbALU1tSTp xueb0BzcB990oNy6p6p+d+SInr/wZAl1mm+lamjyGMd/QKKGYO6eLx+76 MlZlUJoCIcNhFVhuoYa/qt0zebpil87hZnaowhzumBd8LwIjgtop/ZCPN g==; X-IronPort-AV: E=Sophos;i="5.90,151,1643698800"; d="scan'208";a="155595980" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 03 Mar 2022 08:36:52 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 3 Mar 2022 08:36:50 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 3 Mar 2022 08:36:42 -0700 From: Eugen Hristev To: , Subject: [PATCH v6 02/13] media: atmel: atmel-isc-base: replace is_streaming call in s_fmt_vid_cap Date: Thu, 3 Mar 2022 17:36:07 +0200 Message-ID: <20220303153618.2084156-3-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220303153618.2084156-1-eugen.hristev@microchip.com> References: <20220303153618.2084156-1-eugen.hristev@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220303_073653_565996_A030FE6D X-CRM114-Status: GOOD ( 11.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Hans Verkuil , robh+dt@kernel.org, Eugen Hristev , claudiu.beznea@microchip.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In s_fmt_vid_cap, we should check if vb2_is_busy and return EBUSY, not check if it's streaming to return the busy state. Suggested-by: Hans Verkuil Signed-off-by: Eugen Hristev Reviewed-by: Jacopo Mondi --- drivers/media/platform/atmel/atmel-isc-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/atmel/atmel-isc-base.c b/drivers/media/platform/atmel/atmel-isc-base.c index d2cc6c99984f..67b4a2323fed 100644 --- a/drivers/media/platform/atmel/atmel-isc-base.c +++ b/drivers/media/platform/atmel/atmel-isc-base.c @@ -1029,7 +1029,7 @@ static int isc_s_fmt_vid_cap(struct file *file, void *priv, { struct isc_device *isc = video_drvdata(file); - if (vb2_is_streaming(&isc->vb2_vidq)) + if (vb2_is_busy(&isc->vb2_vidq)) return -EBUSY; return isc_set_fmt(isc, f);