public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Umang Jain <umang.jain@ideasonboard.com>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	Michael Riesch <michael.riesch@wolfvision.net>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Ricardo Ribalda <ribalda@kernel.org>,
	Kieran Bingham <kieran.bingham@ideasonboard.com>
Subject: Re: [PATCH 2/2] media: i2c: imx415: Use v4l2_subdev_get_fmt()
Date: Wed, 30 Aug 2023 10:20:47 +0300	[thread overview]
Message-ID: <20230830072047.GJ6477@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20230830045323.71768-3-umang.jain@ideasonboard.com>

Hi Umang,

Thank you for the patch.

On Wed, Aug 30, 2023 at 10:23:23AM +0530, Umang Jain wrote:
> 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 <umang.jain@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  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,

-- 
Regards,

Laurent Pinchart

      parent reply	other threads:[~2023-08-30 19:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-30  4:53 [PATCH 0/2] media: Use v4l2_subdev_get_fmt() Umang Jain
2023-08-30  4:53 ` [PATCH 1/2] media: i2c: imx214: " Umang Jain
2023-08-30  7:19   ` Laurent Pinchart
2023-08-30  7:22     ` Umang Jain
2023-08-30  4:53 ` [PATCH 2/2] media: i2c: imx415: " Umang Jain
2023-08-30  6:54   ` Michael Riesch
2023-08-30  7:20   ` Laurent Pinchart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230830072047.GJ6477@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=michael.riesch@wolfvision.net \
    --cc=ribalda@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=umang.jain@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox