diff options
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_lif.c')
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_lif.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_lif.c b/drivers/media/platform/vsp1/vsp1_lif.c index 730db64bd4d3..59a8017f39af 100644 --- a/drivers/media/platform/vsp1/vsp1_lif.c +++ b/drivers/media/platform/vsp1/vsp1_lif.c @@ -45,34 +45,9 @@ static int lif_enum_mbus_code(struct v4l2_subdev *subdev, MEDIA_BUS_FMT_ARGB8888_1X32, MEDIA_BUS_FMT_AYUV8_1X32, }; - struct vsp1_lif *lif = to_lif(subdev); - - if (code->pad == LIF_PAD_SINK) { - if (code->index >= ARRAY_SIZE(codes)) - return -EINVAL; - - code->code = codes[code->index]; - } else { - struct v4l2_subdev_pad_config *config; - struct v4l2_mbus_framefmt *format; - - /* The LIF can't perform format conversion, the sink format is - * always identical to the source format. - */ - if (code->index) - return -EINVAL; - - config = vsp1_entity_get_pad_config(&lif->entity, cfg, - code->which); - if (!config) - return -EINVAL; - format = vsp1_entity_get_pad_format(&lif->entity, config, - LIF_PAD_SINK); - code->code = format->code; - } - - return 0; + return vsp1_subdev_enum_mbus_code(subdev, cfg, code, codes, + ARRAY_SIZE(codes)); } static int lif_enum_frame_size(struct v4l2_subdev *subdev, |