[media] v4l: vsp1: Factorize get pad format code
[deliverable/linux.git] / drivers / media / platform / vsp1 / vsp1_uds.c
index 90e7d714116087d3c6e629e986dacceb6176119d..59dd53c0d2be83abd01fb8a95c5f9e4a5e93221c 100644 (file)
@@ -182,23 +182,6 @@ static int uds_enum_frame_size(struct v4l2_subdev *subdev,
        return 0;
 }
 
-static int uds_get_format(struct v4l2_subdev *subdev,
-                         struct v4l2_subdev_pad_config *cfg,
-                         struct v4l2_subdev_format *fmt)
-{
-       struct vsp1_uds *uds = to_uds(subdev);
-       struct v4l2_subdev_pad_config *config;
-
-       config = vsp1_entity_get_pad_config(&uds->entity, cfg, fmt->which);
-       if (!config)
-               return -EINVAL;
-
-       fmt->format = *vsp1_entity_get_pad_format(&uds->entity, config,
-                                                 fmt->pad);
-
-       return 0;
-}
-
 static void uds_try_format(struct vsp1_uds *uds,
                           struct v4l2_subdev_pad_config *config,
                           unsigned int pad, struct v4l2_mbus_framefmt *fmt)
@@ -272,7 +255,7 @@ static struct v4l2_subdev_pad_ops uds_pad_ops = {
        .init_cfg = vsp1_entity_init_cfg,
        .enum_mbus_code = uds_enum_mbus_code,
        .enum_frame_size = uds_enum_frame_size,
-       .get_fmt = uds_get_format,
+       .get_fmt = vsp1_subdev_get_pad_format,
        .set_fmt = uds_set_format,
 };
 
@@ -284,7 +267,9 @@ static struct v4l2_subdev_ops uds_ops = {
  * VSP1 Entity Operations
  */
 
-static void uds_configure(struct vsp1_entity *entity, struct vsp1_dl_list *dl)
+static void uds_configure(struct vsp1_entity *entity,
+                         struct vsp1_pipeline *pipe,
+                         struct vsp1_dl_list *dl)
 {
        struct vsp1_uds *uds = to_uds(&entity->subdev);
        const struct v4l2_mbus_framefmt *output;
This page took 0.039573 seconds and 5 git commands to generate.