From patchwork Fri Jan 27 02:27:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 648449 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 EB1F6C54EAA for ; Fri, 27 Jan 2023 02:27:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233217AbjA0C10 (ORCPT ); Thu, 26 Jan 2023 21:27:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233212AbjA0C10 (ORCPT ); Thu, 26 Jan 2023 21:27:26 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50EA04109B for ; Thu, 26 Jan 2023 18:27:25 -0800 (PST) Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2636B2B3; Fri, 27 Jan 2023 03:27:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674786443; bh=y++PVNIJN8a7GEgVg8qGV4r79tB+1d24Xp2hKJjGuoA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NeO/4FasZueGqTOoQx9WBSMWMj2r3/nDVwzaMmpmNvgGHC1mQQGdha+nAMenMqf6f FV/OPzJd8F5hAijVCJOnl/hH7Abf9BEEAD4N6dOwTndvC3JUNrUbQp8eNyEEQfYe3i kYJaO83Rea9SL5u9Luu5tfN+1xc1y1+bTdIkRSE4= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Rui Miguel Silva , Paul Elder , Martin Kepplinger , Adam Ford , kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v1 3/6] media: imx: imx7-media-csi: Drop unneeded check when starting streaming Date: Fri, 27 Jan 2023 04:27:12 +0200 Message-Id: <20230127022715.27234-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230127022715.27234-1-laurent.pinchart@ideasonboard.com> References: <20230127022715.27234-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The .s_stream() operation is guaranteed not to be called to start/stop an already started/stopped subdev. Remove the unneeded check. Signed-off-by: Laurent Pinchart --- drivers/media/platform/nxp/imx7-media-csi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/media/platform/nxp/imx7-media-csi.c b/drivers/media/platform/nxp/imx7-media-csi.c index e96bee4e5921..973a4d015279 100644 --- a/drivers/media/platform/nxp/imx7-media-csi.c +++ b/drivers/media/platform/nxp/imx7-media-csi.c @@ -1734,9 +1734,6 @@ static int imx7_csi_s_stream(struct v4l2_subdev *sd, int enable) goto out_unlock; } - if (csi->is_streaming == !!enable) - goto out_unlock; - if (enable) { ret = imx7_csi_init(csi); if (ret < 0)