Re: [PATCH v2 17/18] media: i2c: imx219: Name all subdev state variables 'state'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 21 Aug 2023 at 23:30, Laurent Pinchart
<laurent.pinchart@xxxxxxxxxxxxxxxx> wrote:
>
> Subdev state variables are named with a mix of 'state' and 'sd_state'
> through the driver. To improve consistency, name them all 'state'.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

Reviewed-by: Dave Stevenson <dave.stevenson@xxxxxxxxxxxxxxx>

> ---
>  drivers/media/i2c/imx219.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
> index 4140d9b78e4c..e2f0d3782e7c 100644
> --- a/drivers/media/i2c/imx219.c
> +++ b/drivers/media/i2c/imx219.c
> @@ -760,7 +760,7 @@ static void imx219_update_pad_format(struct imx219 *imx219,
>  }
>
>  static int imx219_enum_mbus_code(struct v4l2_subdev *sd,
> -                                struct v4l2_subdev_state *sd_state,
> +                                struct v4l2_subdev_state *state,
>                                  struct v4l2_subdev_mbus_code_enum *code)
>  {
>         struct imx219 *imx219 = to_imx219(sd);
> @@ -774,7 +774,7 @@ static int imx219_enum_mbus_code(struct v4l2_subdev *sd,
>  }
>
>  static int imx219_enum_frame_size(struct v4l2_subdev *sd,
> -                                 struct v4l2_subdev_state *sd_state,
> +                                 struct v4l2_subdev_state *state,
>                                   struct v4l2_subdev_frame_size_enum *fse)
>  {
>         struct imx219 *imx219 = to_imx219(sd);
> @@ -796,7 +796,7 @@ static int imx219_enum_frame_size(struct v4l2_subdev *sd,
>  }
>
>  static int imx219_set_pad_format(struct v4l2_subdev *sd,
> -                                struct v4l2_subdev_state *sd_state,
> +                                struct v4l2_subdev_state *state,
>                                  struct v4l2_subdev_format *fmt)
>  {
>         struct imx219 *imx219 = to_imx219(sd);
> @@ -813,7 +813,7 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
>
>         imx219_update_pad_format(imx219, mode, &fmt->format, fmt->format.code);
>
> -       format = v4l2_subdev_get_pad_format(sd, sd_state, 0);
> +       format = v4l2_subdev_get_pad_format(sd, state, 0);
>         *format = fmt->format;
>
>         /*
> @@ -823,7 +823,7 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
>         bin = min3(IMX219_PIXEL_ARRAY_WIDTH / format->width,
>                    IMX219_PIXEL_ARRAY_HEIGHT / format->height, 2U);
>
> -       crop = v4l2_subdev_get_pad_crop(sd, sd_state, 0);
> +       crop = v4l2_subdev_get_pad_crop(sd, state, 0);
>         crop->width = format->width * bin;
>         crop->height = format->height * bin;
>         crop->left = (IMX219_NATIVE_WIDTH - crop->width) / 2;
> @@ -858,12 +858,12 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
>  }
>
>  static int imx219_get_selection(struct v4l2_subdev *sd,
> -                               struct v4l2_subdev_state *sd_state,
> +                               struct v4l2_subdev_state *state,
>                                 struct v4l2_subdev_selection *sel)
>  {
>         switch (sel->target) {
>         case V4L2_SEL_TGT_CROP: {
> -               sel->r = *v4l2_subdev_get_pad_crop(sd, sd_state, 0);
> +               sel->r = *v4l2_subdev_get_pad_crop(sd, state, 0);
>                 return 0;
>         }
>
> --
> Regards,
>
> Laurent Pinchart
>



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux