[media] v4l: vsp1: Factorize get pad format code
[deliverable/linux.git] / drivers / media / platform / vsp1 / vsp1_rwpf.c
index 4d302f5cccb23b8dcae0810b615509db0cdcb481..64d649a1bcf5ef36513338ded58a76fa72e3ff81 100644 (file)
@@ -83,23 +83,6 @@ static int vsp1_rwpf_enum_frame_size(struct v4l2_subdev *subdev,
        return 0;
 }
 
-static int vsp1_rwpf_get_format(struct v4l2_subdev *subdev,
-                               struct v4l2_subdev_pad_config *cfg,
-                               struct v4l2_subdev_format *fmt)
-{
-       struct vsp1_rwpf *rwpf = to_rwpf(subdev);
-       struct v4l2_subdev_pad_config *config;
-
-       config = vsp1_entity_get_pad_config(&rwpf->entity, cfg, fmt->which);
-       if (!config)
-               return -EINVAL;
-
-       fmt->format = *vsp1_entity_get_pad_format(&rwpf->entity, config,
-                                                 fmt->pad);
-
-       return 0;
-}
-
 static int vsp1_rwpf_set_format(struct v4l2_subdev *subdev,
                                struct v4l2_subdev_pad_config *cfg,
                                struct v4l2_subdev_format *fmt)
@@ -254,7 +237,7 @@ const struct v4l2_subdev_pad_ops vsp1_rwpf_pad_ops = {
        .init_cfg = vsp1_entity_init_cfg,
        .enum_mbus_code = vsp1_rwpf_enum_mbus_code,
        .enum_frame_size = vsp1_rwpf_enum_frame_size,
-       .get_fmt = vsp1_rwpf_get_format,
+       .get_fmt = vsp1_subdev_get_pad_format,
        .set_fmt = vsp1_rwpf_set_format,
        .get_selection = vsp1_rwpf_get_selection,
        .set_selection = vsp1_rwpf_set_selection,
This page took 0.024859 seconds and 5 git commands to generate.