From patchwork Tue May 3 08:44:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 569189 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 4A739C433F5 for ; Tue, 3 May 2022 08:45:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232900AbiECIsg (ORCPT ); Tue, 3 May 2022 04:48:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232873AbiECIsf (ORCPT ); Tue, 3 May 2022 04:48:35 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C980D3526C; Tue, 3 May 2022 01:45:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1651567502; x=1683103502; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ktAuPeikT5yIzQagKaEvWRybAOSvIjqqN73SIJDSJFk=; b=FCQjACGshnMl/hBAPhfRcId2HofyZX5ejMXGZ+FjPOwqc1PNImUp+zJm VNNe9pfBSLSxbMOV3uIFLdHPvOPv00prM5dKCo2E0TuqmLW26A/dxnPfz C95v4dg9t81e2ZOKvTG5jGUbxReJ4ROTN9jq2g1dxEKyGqVvakwHIH9Q7 TVsJm0Y5cFsT6qXd7BXQhWFueMgrXVp6mW/JVGyfKTgnnqD700OQG0o1f rVIOW3oZsy4xVveG7plJ5vH4wqeNedBrnsWopRqF+WWpOUpE3U8CMZA95 34DIfCpv0cNks0arb57+8VpCebtZOi7EIUuBRf6Ot7P/tl3Syt4DzI0K+ g==; X-IronPort-AV: E=Sophos;i="5.91,194,1647327600"; d="scan'208";a="94358168" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 03 May 2022 01:45:01 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 3 May 2022 01:45:00 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 3 May 2022 01:44:55 -0700 From: Eugen Hristev To: , CC: , , , , Eugen Hristev Subject: [PATCH v10 2/8] media: atmel: atmel-isc-base: replace is_streaming call in s_fmt_vid_cap Date: Tue, 3 May 2022 11:44:15 +0300 Message-ID: <20220503084421.40682-3-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220503084421.40682-1-eugen.hristev@microchip.com> References: <20220503084421.40682-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);