[media] v4l: vsp1: Factorize get pad format code
[deliverable/linux.git] / drivers / media / platform / vsp1 / vsp1_uds.c
index 42f2d0465bd6ca1a8edb24ca43b6dbff8d8cf183..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,
 };
 
This page took 0.025571 seconds and 5 git commands to generate.