summaryrefslogtreecommitdiff
path: root/drivers/media/platform/omap3isp/ispresizer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/platform/omap3isp/ispresizer.c')
-rw-r--r--drivers/media/platform/omap3isp/ispresizer.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/drivers/media/platform/omap3isp/ispresizer.c b/drivers/media/platform/omap3isp/ispresizer.c
index b48ad4d4b834..249af7f524f9 100644
--- a/drivers/media/platform/omap3isp/ispresizer.c
+++ b/drivers/media/platform/omap3isp/ispresizer.c
@@ -1755,21 +1755,8 @@ static int resizer_init_entities(struct isp_res_device *res)
res->video_out.video.entity.flags |= MEDIA_ENT_FL_DEFAULT;
- /* Connect the video nodes to the resizer subdev. */
- ret = media_create_pad_link(&res->video_in.video.entity, 0,
- &res->subdev.entity, RESZ_PAD_SINK, 0);
- if (ret < 0)
- goto error_link;
-
- ret = media_create_pad_link(&res->subdev.entity, RESZ_PAD_SOURCE,
- &res->video_out.video.entity, 0, 0);
- if (ret < 0)
- goto error_link;
-
return 0;
-error_link:
- omap3isp_video_cleanup(&res->video_out);
error_video_out:
omap3isp_video_cleanup(&res->video_in);
error_video_in:
@@ -1793,6 +1780,26 @@ int omap3isp_resizer_init(struct isp_device *isp)
return resizer_init_entities(res);
}
+/*
+ * omap3isp_resizer_create_pads_links - Resizer pads links creation
+ * @isp : Pointer to ISP device
+ * return negative error code or zero on success
+ */
+int omap3isp_resizer_create_pads_links(struct isp_device *isp)
+{
+ struct isp_res_device *res = &isp->isp_res;
+ int ret;
+
+ /* Connect the video nodes to the resizer subdev. */
+ ret = media_create_pad_link(&res->video_in.video.entity, 0,
+ &res->subdev.entity, RESZ_PAD_SINK, 0);
+ if (ret < 0)
+ return ret;
+
+ return media_create_pad_link(&res->subdev.entity, RESZ_PAD_SOURCE,
+ &res->video_out.video.entity, 0, 0);
+}
+
void omap3isp_resizer_cleanup(struct isp_device *isp)
{
struct isp_res_device *res = &isp->isp_res;