diff mbox series

media: i2c: imx290: drop format param from imx290_ctrl_update

Message ID 20230608222810.574628-1-tomm.merciai@gmail.com (mailing list archive)
State New, archived
Headers show
Series media: i2c: imx290: drop format param from imx290_ctrl_update | expand

Commit Message

Tommaso Merciai June 8, 2023, 10:28 p.m. UTC
The format param actually is not used in imx290_ctrl_update
function, let's drop this

Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
---
 drivers/media/i2c/imx290.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

Dave Stevenson June 9, 2023, 11:36 a.m. UTC | #1
Hi Tommaso

Thanks for the patch.

On Thu, 8 Jun 2023 at 23:28, Tommaso Merciai <tomm.merciai@gmail.com> wrote:
>
> The format param actually is not used in imx290_ctrl_update
> function, let's drop this
>
> Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>

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

You (or a maintainer in applying it) could add:

Fixes: bc35f9a21a55 ("media: i2c: imx290: Fix the pixel rate at 148.5Mpix/s")

> ---
>  drivers/media/i2c/imx290.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
> index 5ea25b7acc55..a84b581682a2 100644
> --- a/drivers/media/i2c/imx290.c
> +++ b/drivers/media/i2c/imx290.c
> @@ -902,7 +902,6 @@ static const char * const imx290_test_pattern_menu[] = {
>  };
>
>  static void imx290_ctrl_update(struct imx290 *imx290,
> -                              const struct v4l2_mbus_framefmt *format,
>                                const struct imx290_mode *mode)
>  {
>         unsigned int hblank_min = mode->hmax_min - mode->width;
> @@ -1195,7 +1194,7 @@ static int imx290_set_fmt(struct v4l2_subdev *sd,
>         if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) {
>                 imx290->current_mode = mode;
>
> -               imx290_ctrl_update(imx290, &fmt->format, mode);
> +               imx290_ctrl_update(imx290, mode);
>                 imx290_exposure_update(imx290, mode);
>         }
>
> @@ -1300,7 +1299,6 @@ static const struct media_entity_operations imx290_subdev_entity_ops = {
>  static int imx290_subdev_init(struct imx290 *imx290)
>  {
>         struct i2c_client *client = to_i2c_client(imx290->dev);
> -       const struct v4l2_mbus_framefmt *format;
>         struct v4l2_subdev_state *state;
>         int ret;
>
> @@ -1335,8 +1333,7 @@ static int imx290_subdev_init(struct imx290 *imx290)
>         }
>
>         state = v4l2_subdev_lock_and_get_active_state(&imx290->sd);
> -       format = v4l2_subdev_get_pad_format(&imx290->sd, state, 0);
> -       imx290_ctrl_update(imx290, format, imx290->current_mode);
> +       imx290_ctrl_update(imx290, imx290->current_mode);
>         v4l2_subdev_unlock_state(state);
>
>         return 0;
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
index 5ea25b7acc55..a84b581682a2 100644
--- a/drivers/media/i2c/imx290.c
+++ b/drivers/media/i2c/imx290.c
@@ -902,7 +902,6 @@  static const char * const imx290_test_pattern_menu[] = {
 };
 
 static void imx290_ctrl_update(struct imx290 *imx290,
-			       const struct v4l2_mbus_framefmt *format,
 			       const struct imx290_mode *mode)
 {
 	unsigned int hblank_min = mode->hmax_min - mode->width;
@@ -1195,7 +1194,7 @@  static int imx290_set_fmt(struct v4l2_subdev *sd,
 	if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) {
 		imx290->current_mode = mode;
 
-		imx290_ctrl_update(imx290, &fmt->format, mode);
+		imx290_ctrl_update(imx290, mode);
 		imx290_exposure_update(imx290, mode);
 	}
 
@@ -1300,7 +1299,6 @@  static const struct media_entity_operations imx290_subdev_entity_ops = {
 static int imx290_subdev_init(struct imx290 *imx290)
 {
 	struct i2c_client *client = to_i2c_client(imx290->dev);
-	const struct v4l2_mbus_framefmt *format;
 	struct v4l2_subdev_state *state;
 	int ret;
 
@@ -1335,8 +1333,7 @@  static int imx290_subdev_init(struct imx290 *imx290)
 	}
 
 	state = v4l2_subdev_lock_and_get_active_state(&imx290->sd);
-	format = v4l2_subdev_get_pad_format(&imx290->sd, state, 0);
-	imx290_ctrl_update(imx290, format, imx290->current_mode);
+	imx290_ctrl_update(imx290, imx290->current_mode);
 	v4l2_subdev_unlock_state(state);
 
 	return 0;