Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1485163pxp; Thu, 10 Mar 2022 06:24:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+Q8K91awUOpS2IWJREFo8brFuldmDbMhwz3AiCcZ0VXzB82ZFmgb+6uedZpOq6M+p3yTl X-Received: by 2002:a17:906:80d2:b0:6db:40bf:892c with SMTP id a18-20020a17090680d200b006db40bf892cmr4608091ejx.726.1646922294667; Thu, 10 Mar 2022 06:24:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646922294; cv=none; d=google.com; s=arc-20160816; b=ddhwI8otGrNsYswJrYn0UQXLDjWI7+onuNQu7s893kVvmCkl6a+NUesnzig0x+pYZf AgLlNa5ELx+5RxmRWXyYJA3MMdeDLp+orMlHEOLHtWzUfdz801FHoIqXQeSQVrZW+E4r w44MRZEQRw9ro/KVC2BUTFcdn+dAmeV5FlC7xzr1L9vVbPaJoFssH/LbShA9Ak/E3tSO KzlMTJAeaeYDhVn4Ine2igcXhLi5cu8Jv/RkWQgunpqFuJtTaVr5QmMP06NXbeetJkzr FyWVyphiBq2yeHCH0kuD6UYzpZ5mzO3ikX1ShzazWvEwcXAjUzhDjiB5bKFrp09sxlc7 p0Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TBjkZF+VASeBBFI1OAc29aFrXNteY0hfl/8xpsAGj6I=; b=ggrBmxJ1b0HYPiAamly5so/3+8GIjj6IAU6LUCOuD9cmxpN8KqcYdM/Ff+FxFlBGxq E1dC5SOfU5ktL7KWLLN+ib8uqulzDtGxXk4F8dwd2qyaQBMiwJXuBhUrUQwo4YZSTR1C VfUnCQUdq6SmTvz9IpoblzBy3i9lrpe0FqyPhJTCggCUy7jYt1WBs1gYWysey/hn5HqO 4i4t+Eobs8Pvs+corSC8aogyY+wLfVIB8bDVp/8BBt0sRhhY7bhuD2Q1kXZYnkPrVOsg dHe1Y27eFlzyWLYGHzJ84QHwyP2/vykwZJ7KiIcv1TZNNcHbBO1SauuMY+oHRNMBUv2A 9Xjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=srnfr7HS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q7-20020a17090676c700b006adefdfba73si3234907ejn.729.2022.03.10.06.24.30; Thu, 10 Mar 2022 06:24:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=srnfr7HS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235815AbiCJJxs (ORCPT + 99 others); Thu, 10 Mar 2022 04:53:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240974AbiCJJxe (ORCPT ); Thu, 10 Mar 2022 04:53:34 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30041DB; Thu, 10 Mar 2022 01:52:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1646905948; x=1678441948; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ktAuPeikT5yIzQagKaEvWRybAOSvIjqqN73SIJDSJFk=; b=srnfr7HSwAwdbUhe0ukwSZyn9IyEK6BmPLqRlCsTQyd26//6WTeeo+Cd HZzxFNQrwb75oc1kIB1En7HnYtQmUJEHkwoOtlYmgmI0nAHcpGVFQhnPD WRevQsf7xqZGmPb7u4qmIHC1daimGiyyB2Ywy31yq9iumhoJhXR2aTVBV JCLVpFwt6igPp/VRDn/gdx8iqOZuY8rtCd9+uUYpOEskqzhJmZyvj8rcC 6bHwb2rhg8TbcVu13kW1/J97wMDKFBlTOJLQyqMY5dMZNHXFuVa545Stm in/zXUlLmWnS5te9YztZLSpeG6jC2uUdbIkjaUxGUILzVBNMpiCgJJytI Q==; X-IronPort-AV: E=Sophos;i="5.90,170,1643698800"; d="scan'208";a="148746115" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 10 Mar 2022 02:52:26 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 10 Mar 2022 02:52:25 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 10 Mar 2022 02:52:22 -0700 From: Eugen Hristev To: , CC: , , , , , , Eugen Hristev , Hans Verkuil Subject: [PATCH v9 02/13] media: atmel: atmel-isc-base: replace is_streaming call in s_fmt_vid_cap Date: Thu, 10 Mar 2022 11:51:51 +0200 Message-ID: <20220310095202.2701399-3-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220310095202.2701399-1-eugen.hristev@microchip.com> References: <20220310095202.2701399-1-eugen.hristev@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_SCC_BODY_TEXT_LINE, T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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); -- 2.25.1