@@ -1980,6 +1980,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)
@@ -2115,20 +2129,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)