Re: [PATCH v8 21/38] media: ccs: Move ccs_validate_csi_data_format up

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

 



Hi Sakari,

Thank you for the patch.

On Wed, Mar 13, 2024 at 09:24:59AM +0200, Sakari Ailus wrote:
> ccs_validate_csi_data_format() will soon be needed elsewhere, above its
> current location. Move it up.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx>

> ---
>  drivers/media/i2c/ccs/ccs-core.c | 28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
> index 0cd8ee957655..0efbc63534bc 100644
> --- a/drivers/media/i2c/ccs/ccs-core.c
> +++ b/drivers/media/i2c/ccs/ccs-core.c
> @@ -1979,6 +1979,20 @@ static int ccs_post_streamoff(struct v4l2_subdev *subdev)
>  	return pm_runtime_put(&client->dev);
>  }
>  
> +static const struct ccs_csi_data_format
> +*ccs_validate_csi_data_format(struct ccs_sensor *sensor, u32 code)
> +{
> +	unsigned int i;
> +
> +	for (i = 0; i < ARRAY_SIZE(ccs_csi_data_formats); i++) {
> +		if (sensor->mbus_frame_fmts & (1 << i) &&
> +		    ccs_csi_data_formats[i].code == code)
> +			return &ccs_csi_data_formats[i];
> +	}
> +
> +	return sensor->csi_format;
> +}
> +
>  static int ccs_enum_mbus_code(struct v4l2_subdev *subdev,
>  			      struct v4l2_subdev_state *sd_state,
>  			      struct v4l2_subdev_mbus_code_enum *code)
> @@ -2114,20 +2128,6 @@ static void ccs_propagate(struct v4l2_subdev *subdev,
>  	}
>  }
>  
> -static const struct ccs_csi_data_format
> -*ccs_validate_csi_data_format(struct ccs_sensor *sensor, u32 code)
> -{
> -	unsigned int i;
> -
> -	for (i = 0; i < ARRAY_SIZE(ccs_csi_data_formats); i++) {
> -		if (sensor->mbus_frame_fmts & (1 << i) &&
> -		    ccs_csi_data_formats[i].code == code)
> -			return &ccs_csi_data_formats[i];
> -	}
> -
> -	return sensor->csi_format;
> -}
> -
>  static int ccs_set_format_source(struct v4l2_subdev *subdev,
>  				 struct v4l2_subdev_state *sd_state,
>  				 struct v4l2_subdev_format *fmt)

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