Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2099531pxp; Mon, 7 Mar 2022 08:23:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzqyLD8viDoa3RnflPQk9f5+6t7SO8hGlHa/2aySnFEd9/Y/5MNfEkRYDxzw1Isl1SQjw1M X-Received: by 2002:a63:83c1:0:b0:37c:b3c2:9016 with SMTP id h184-20020a6383c1000000b0037cb3c29016mr10815589pge.143.1646670201848; Mon, 07 Mar 2022 08:23:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646670201; cv=none; d=google.com; s=arc-20160816; b=He3dY9LusuVg2JVaWzM6YFIX65IGgo38YYJy6QOI89EzCZYBCFeoP9cg9VtYMzZBsZ gEQD7ctYwXfQjmWW4qsKz0Dntvsd+cwxsKZzLh9uJS+1DVVPxmVY9jsz9tCHFcO8oCya OvqZ2cURjv0uZ0Hu3uXhSZzudsDsV6bUxLQoNdo16jh/GgSd3zpwj4S0dpvV1f4GfzJn oH9O7Q9f/7mXkAFZVOeJMr/snkEHWjWY7nQC7OXnJ/15RPz7IgzJ/5TAQwZ6or03zvqp mZ3tLXpz24XbK53DrNlWJP1AUgxhuQ/8xC4gsnlnPkN5D2mhsdcJ+V+bU+y5YPnIEiWh NknQ== 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=oM6WcpkoZ9wNm2lyY+V0Uup98qul4dNkfJh5KjsL7zFJl7PMsZf2oMiNltHhC/WYWY lsc3CUG1tgTzFBe+F+L7rtY0Gk4XMimHrdpNDkGvhx/el60mtinKWqWgh5c6MWFYUhTt gW/vQJIiX5xESlOhCJPwn/BxYGqer8FeczgqokMc6OHbwGJrf/2Dd1XLqF8m41Q6uf7I XovaUjnKm5bKLGars9+jwi1KO/J6EIS0/3uw3hAc3aLd1cpKlAOxgiMWJLP06VyG1yG5 ij5ebv57o6v0siUFpNYFPTJuS7rofPSjofe76ODxwl70LzWjtYodbArUJ07gkWQMzzkF i+OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=1e7DS6Rc; 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 s14-20020a63f04e000000b00373ad996c9dsi13115468pgj.288.2022.03.07.08.23.04; Mon, 07 Mar 2022 08:23:21 -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=1e7DS6Rc; 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 S238703AbiCGMGP (ORCPT + 99 others); Mon, 7 Mar 2022 07:06:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238512AbiCGMGM (ORCPT ); Mon, 7 Mar 2022 07:06:12 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DBE8710DC; Mon, 7 Mar 2022 04:05:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1646654712; x=1678190712; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ktAuPeikT5yIzQagKaEvWRybAOSvIjqqN73SIJDSJFk=; b=1e7DS6RcEBPSAtanArxzvGUup/A8ij/dAHHw1OVgB0xwELXkh81n9sFP iO17MRA793iuOysJzKfCmb4Qa06OnYHSRgcvdeudQiUd+oNdFElDz26/y Ov/+LHsUuH9vQDNEzpfhR2/k0bPat4R+PNfncQoIEVyRlhql0ErtCheZj 2jU1wjWzgWr7w/Ba4OI9iepRpO9Cow19j7qqTmC4VDIWRguc8GV6NTrZT f3TeGL/oS2w5lgWKy+Rc8glu4OlOwY5WugiSb+GD+H5MUmq0wQ4Q8KntU s52wHkLk1h2tmOXxFKF47BSJZX54UIQ37PZWECZRbDj0BGEYktdkp6rt/ g==; X-IronPort-AV: E=Sophos;i="5.90,162,1643698800"; d="scan'208";a="155940788" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 07 Mar 2022 05:05:11 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Mon, 7 Mar 2022 05:05:10 -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; Mon, 7 Mar 2022 05:05:02 -0700 From: Eugen Hristev To: , CC: , , , , , , Eugen Hristev , Hans Verkuil Subject: [PATCH v7 02/13] media: atmel: atmel-isc-base: replace is_streaming call in s_fmt_vid_cap Date: Mon, 7 Mar 2022 14:04:12 +0200 Message-ID: <20220307120423.2427631-3-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220307120423.2427631-1-eugen.hristev@microchip.com> References: <20220307120423.2427631-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