Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp4083244rdb; Wed, 30 Aug 2023 15:16:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEEUWGZSbrFwgl7u1uYCHggWw0l9VrILUo7zEKj4Of+BvIxGk3p5Xw3vzqjIRl8BV9f4syk X-Received: by 2002:a17:906:9bfa:b0:9a2:1e14:86b9 with SMTP id de58-20020a1709069bfa00b009a21e1486b9mr1149674ejc.0.1693433799115; Wed, 30 Aug 2023 15:16:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693433799; cv=none; d=google.com; s=arc-20160816; b=CRGXyP2NX0LHaFJCSeTGzJDUcA7kuUrAhlXK2WwIF8avaIH94anrCs62FBRbMZjPwa 1pgsFp0uL6Ot2rhyLC5sPl/B6xfV1LQUSOCsm5lL1jo/TooOvBtIIehv/Cua6Nb4ix3r OnJkLiYBC/V1eJRfHaQqIZ4/6hLqTerj51khd0NlWlc1qK4tWigd/W7Mq4OmTF2LcJOJ LLgm9iJ7OmbfxBRhlr8rV/VBMAquBGcX0DAaIxPYwpmVhnW295hOz3r/B/asEQ3WxiEy lc4F6nl/3bYd0D0iYT4mbFMkYh+vqLhBJD98xgBCguFAfqSyNKUOo3IbMG4ibKhYtVqn wUcw== 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=oS+V7MtbBl6Gw7KNCTfbMIANL5oSvgYs0tFRwCWQzlk=; fh=cGk30rAzsXC7LRPrIl/vZVc8g2CZldJkAptJ1VtLoHU=; b=lBz6GNRnhlOz3UBcjRC+iGZ5U72RroK36lW3CvEF98OipkHOk8opkh5aouFl33XAVr JquxiZ8xbjGXb1y+tmVtxByPRhk0TxwvzA5PhYAh1kWvKKaZDCsYyQio2wOr6ZJRzhsy YENKsyhPLRlZItseWRoLYPEbolDLZQxS/wZG+mvw3TmxG4hrYrdjsCCZvk5BHDMPxpWx XdjhjtlDIhNnQsD66b7G2XywX2Aw6n8ZIy5J5Xx+31JkxW4wHVldU891k59gKf1DRLbF PDLb35/ATSbxdlpW0IdQkhWepdH8rQiGE+k5rBqv8lt9+ls5TyV76+1p8WH4hF7cE6dG BZlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=V6xjQeOp; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x18-20020a170906805200b009655fcff588si59720ejw.835.2023.08.30.15.16.09; Wed, 30 Aug 2023 15:16:39 -0700 (PDT) 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=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=V6xjQeOp; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242103AbjH3Exr (ORCPT + 99 others); Wed, 30 Aug 2023 00:53:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242049AbjH3Exi (ORCPT ); Wed, 30 Aug 2023 00:53:38 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CFF8CC5; Tue, 29 Aug 2023 21:53:36 -0700 (PDT) Received: from umang.jainideasonboard.com (unknown [103.251.226.104]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6C81B10FE; Wed, 30 Aug 2023 06:52:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1693371133; bh=r78Ey/3mCQEZBydNa5/i6pNT9NCVYnpDcX91M+kE4Kg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V6xjQeOpkM/4WQkouPbCVZiCcbK8glJ0lRVARV6Hl+wgu2FXA5G8aKv3QeplyG10R 3xajTIs4swufSlEZRozdt8XB2DJJtqXDa4Xc1+IE9oJpk7+aazWmOSDqBH0d1F5BMg aY/SAFiZrRsJy1JRrIs1TB7xwtmXbWtoqX1qJvXg= From: Umang Jain To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Michael Riesch , Sakari Ailus , Mauro Carvalho Chehab , Ricardo Ribalda , Laurent Pinchart , Kieran Bingham , Umang Jain Subject: [PATCH 2/2] media: i2c: imx415: Use v4l2_subdev_get_fmt() Date: Wed, 30 Aug 2023 10:23:23 +0530 Message-Id: <20230830045323.71768-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230830045323.71768-1-umang.jain@ideasonboard.com> References: <20230830045323.71768-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS 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 The imx415 driver uses the subdev active state, there's no need to implement the .get_fmt() operation manually. Use the v4l2_subdev_get_fmt() helper instead. Signed-off-by: Umang Jain --- drivers/media/i2c/imx415.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/media/i2c/imx415.c b/drivers/media/i2c/imx415.c index 3f00172df3cc..9a7ac81edc28 100644 --- a/drivers/media/i2c/imx415.c +++ b/drivers/media/i2c/imx415.c @@ -842,15 +842,6 @@ static int imx415_enum_frame_size(struct v4l2_subdev *sd, return 0; } -static int imx415_get_format(struct v4l2_subdev *sd, - struct v4l2_subdev_state *state, - struct v4l2_subdev_format *fmt) -{ - fmt->format = *v4l2_subdev_get_pad_format(sd, state, fmt->pad); - - return 0; -} - static int imx415_set_format(struct v4l2_subdev *sd, struct v4l2_subdev_state *state, struct v4l2_subdev_format *fmt) @@ -913,7 +904,7 @@ static const struct v4l2_subdev_video_ops imx415_subdev_video_ops = { static const struct v4l2_subdev_pad_ops imx415_subdev_pad_ops = { .enum_mbus_code = imx415_enum_mbus_code, .enum_frame_size = imx415_enum_frame_size, - .get_fmt = imx415_get_format, + .get_fmt = v4l2_subdev_get_fmt, .set_fmt = imx415_set_format, .get_selection = imx415_get_selection, .init_cfg = imx415_init_cfg, -- 2.41.0