diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2016-02-24 21:10:13 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-04-13 19:04:26 -0300 |
commit | 3f557220cc29d1961ef9efa2a8db04c7c5f6e6d4 (patch) | |
tree | 0f8a1256ffcd2442b9875da8ae6c7f9af9427059 /drivers/media/platform/vsp1/vsp1_hsit.c | |
parent | 5b22a11e0b21e7da8fcefd913688c4cfcdf08825 (diff) |
[media] v4l: vsp1: Factorize get pad format code
All entities implement the same get pad format handler, factorize it
into a common function.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_hsit.c')
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_hsit.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_hsit.c b/drivers/media/platform/vsp1/vsp1_hsit.c index f02e4ca77a7c..7cf2add51bf9 100644 --- a/drivers/media/platform/vsp1/vsp1_hsit.c +++ b/drivers/media/platform/vsp1/vsp1_hsit.c @@ -90,23 +90,6 @@ static int hsit_enum_frame_size(struct v4l2_subdev *subdev, return 0; } -static int hsit_get_format(struct v4l2_subdev *subdev, - struct v4l2_subdev_pad_config *cfg, - struct v4l2_subdev_format *fmt) -{ - struct vsp1_hsit *hsit = to_hsit(subdev); - struct v4l2_subdev_pad_config *config; - - config = vsp1_entity_get_pad_config(&hsit->entity, cfg, fmt->which); - if (!config) - return -EINVAL; - - fmt->format = *vsp1_entity_get_pad_format(&hsit->entity, config, - fmt->pad); - - return 0; -} - static int hsit_set_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg, struct v4l2_subdev_format *fmt) @@ -154,7 +137,7 @@ static struct v4l2_subdev_pad_ops hsit_pad_ops = { .init_cfg = vsp1_entity_init_cfg, .enum_mbus_code = hsit_enum_mbus_code, .enum_frame_size = hsit_enum_frame_size, - .get_fmt = hsit_get_format, + .get_fmt = vsp1_subdev_get_pad_format, .set_fmt = hsit_set_format, }; |