From patchwork Thu Mar 10 09:51:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 550239 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 0BFACC433F5 for ; Thu, 10 Mar 2022 09:52:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240988AbiCJJxk (ORCPT ); Thu, 10 Mar 2022 04:53:40 -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 Precedence: bulk List-ID: X-Mailing-List: linux-media@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);