]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] media: Rename media_entity_remote_source to media_entity_remote_pad
authorAndrzej Hajda <a.hajda@samsung.com>
Mon, 3 Jun 2013 08:16:13 +0000 (05:16 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 9 Jun 2013 00:47:11 +0000 (21:47 -0300)
Function media_entity_remote_source actually returns the remote pad to
the given one, regardless if this is the source or the sink pad.
Name media_entity_remote_pad is more adequate for this function.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 files changed:
Documentation/media-framework.txt
drivers/media/media-entity.c
drivers/media/platform/exynos4-is/fimc-capture.c
drivers/media/platform/exynos4-is/fimc-lite.c
drivers/media/platform/exynos4-is/media-dev.c
drivers/media/platform/omap3isp/isp.c
drivers/media/platform/omap3isp/ispccdc.c
drivers/media/platform/omap3isp/ispccp2.c
drivers/media/platform/omap3isp/ispcsi2.c
drivers/media/platform/omap3isp/ispvideo.c
drivers/media/platform/s3c-camif/camif-capture.c
drivers/staging/media/davinci_vpfe/vpfe_video.c
include/media/media-entity.h

index 77bd0a42f19df6832eb89414b9689f3893bf96eb..3702eff30db3dd6b7ff6337678c2bd14c6ba1acf 100644 (file)
@@ -265,7 +265,7 @@ connected to another pad through an enabled link
        media_entity_find_link(struct media_pad *source,
                               struct media_pad *sink);
 
-       media_entity_remote_source(struct media_pad *pad);
+       media_entity_remote_pad(struct media_pad *pad);
 
 Refer to the kerneldoc documentation for more information.
 
index e1cd13283407ce65b0c64345c9732be8e75aaf96..0438209d020a4507e305211b74373593e28a5050 100644 (file)
@@ -560,17 +560,16 @@ media_entity_find_link(struct media_pad *source, struct media_pad *sink)
 EXPORT_SYMBOL_GPL(media_entity_find_link);
 
 /**
- * media_entity_remote_source - Find the source pad at the remote end of a link
- * @pad: Sink pad at the local end of the link
+ * media_entity_remote_pad - Find the pad at the remote end of a link
+ * @pad: Pad at the local end of the link
  *
- * Search for a remote source pad connected to the given sink pad by iterating
- * over all links originating or terminating at that pad until an enabled link
- * is found.
+ * Search for a remote pad connected to the given pad by iterating over all
+ * links originating or terminating at that pad until an enabled link is found.
  *
  * Return a pointer to the pad at the remote end of the first found enabled
  * link, or NULL if no enabled link has been found.
  */
-struct media_pad *media_entity_remote_source(struct media_pad *pad)
+struct media_pad *media_entity_remote_pad(struct media_pad *pad)
 {
        unsigned int i;
 
@@ -590,4 +589,4 @@ struct media_pad *media_entity_remote_source(struct media_pad *pad)
        return NULL;
 
 }
-EXPORT_SYMBOL_GPL(media_entity_remote_source);
+EXPORT_SYMBOL_GPL(media_entity_remote_pad);
index 528f41369364df47584d696e6c586df2e56e7be4..a8b9b06d96aa6b274689b1711901e5ba0ccdf0fd 100644 (file)
@@ -773,7 +773,7 @@ static struct media_entity *fimc_pipeline_get_head(struct media_entity *me)
        struct media_pad *pad = &me->pads[0];
 
        while (!(pad->flags & MEDIA_PAD_FL_SOURCE)) {
-               pad = media_entity_remote_source(pad);
+               pad = media_entity_remote_pad(pad);
                if (!pad)
                        break;
                me = pad->entity;
@@ -845,7 +845,7 @@ static int fimc_pipeline_try_format(struct fimc_ctx *ctx,
                                        return ret;
                        }
 
-                       pad = media_entity_remote_source(&me->pads[sfmt.pad]);
+                       pad = media_entity_remote_pad(&me->pads[sfmt.pad]);
                        if (!pad)
                                return -EINVAL;
                        me = pad->entity;
@@ -1146,7 +1146,7 @@ static int fimc_pipeline_validate(struct fimc_dev *fimc)
 
                        if (p->flags & MEDIA_PAD_FL_SINK) {
                                sink_pad = p;
-                               src_pad = media_entity_remote_source(sink_pad);
+                               src_pad = media_entity_remote_pad(sink_pad);
                                if (src_pad)
                                        break;
                        }
index 14bb7bc8adbeccc9adb4cf896a9c83f48899af95..2f11ae4fd4a4f9bedf87eb67623bc53a4b3f4470 100644 (file)
@@ -139,7 +139,7 @@ static struct v4l2_subdev *__find_remote_sensor(struct media_entity *me)
 
        while (pad->flags & MEDIA_PAD_FL_SINK) {
                /* source pad */
-               pad = media_entity_remote_source(pad);
+               pad = media_entity_remote_pad(pad);
                if (pad == NULL ||
                    media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV)
                        break;
@@ -786,7 +786,7 @@ static int fimc_pipeline_validate(struct fimc_lite *fimc)
                                return -EPIPE;
                }
                /* Retrieve format at the source pad */
-               pad = media_entity_remote_source(pad);
+               pad = media_entity_remote_pad(pad);
                if (pad == NULL ||
                    media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV)
                        break;
index 15ef8f28239b797df583fa910720847cd4e14947..396e06e14a17e10d1b5611843d0745f4a1f95e8b 100644 (file)
@@ -62,7 +62,7 @@ static void fimc_pipeline_prepare(struct fimc_pipeline *p,
                        struct media_pad *spad = &me->pads[i];
                        if (!(spad->flags & MEDIA_PAD_FL_SINK))
                                continue;
-                       pad = media_entity_remote_source(spad);
+                       pad = media_entity_remote_pad(spad);
                        if (pad)
                                break;
                }
index 1d7dbd5c0fbab03a88f63e74d9bfe0217d695c06..4c4bd3d1a2bc8c5a73b22b5fddf723b036145722 100644 (file)
@@ -877,7 +877,7 @@ static int isp_pipeline_enable(struct isp_pipeline *pipe,
                if (!(pad->flags & MEDIA_PAD_FL_SINK))
                        break;
 
-               pad = media_entity_remote_source(pad);
+               pad = media_entity_remote_pad(pad);
                if (pad == NULL ||
                    media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV)
                        break;
@@ -967,7 +967,7 @@ static int isp_pipeline_disable(struct isp_pipeline *pipe)
                if (!(pad->flags & MEDIA_PAD_FL_SINK))
                        break;
 
-               pad = media_entity_remote_source(pad);
+               pad = media_entity_remote_pad(pad);
                if (pad == NULL ||
                    media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV)
                        break;
@@ -1083,7 +1083,7 @@ static int isp_pipeline_is_last(struct media_entity *me)
        pipe = to_isp_pipeline(me);
        if (pipe->stream_state == ISP_PIPELINE_STREAM_STOPPED)
                return 0;
-       pad = media_entity_remote_source(&pipe->output->pad);
+       pad = media_entity_remote_pad(&pipe->output->pad);
        return pad->entity == me;
 }
 
index 60e60aa64fb461cb05799ec72fbe4f67e0ef62a1..907a205da5a55d977fe39e40c7b612315578e996 100644 (file)
@@ -1120,7 +1120,7 @@ static void ccdc_configure(struct isp_ccdc_device *ccdc)
        u32 syn_mode;
        u32 ccdc_pattern;
 
-       pad = media_entity_remote_source(&ccdc->pads[CCDC_PAD_SINK]);
+       pad = media_entity_remote_pad(&ccdc->pads[CCDC_PAD_SINK]);
        sensor = media_entity_to_v4l2_subdev(pad->entity);
        if (ccdc->input == CCDC_INPUT_PARALLEL)
                pdata = &((struct isp_v4l2_subdevs_group *)sensor->host_priv)
index c5d84c977e2918f4a1ab774428080e4d29b20fb1..13982b0ab560f2603810ab8547413fe99956a3c1 100644 (file)
@@ -360,7 +360,7 @@ static int ccp2_if_configure(struct isp_ccp2_device *ccp2)
 
        ccp2_pwr_cfg(ccp2);
 
-       pad = media_entity_remote_source(&ccp2->pads[CCP2_PAD_SINK]);
+       pad = media_entity_remote_pad(&ccp2->pads[CCP2_PAD_SINK]);
        sensor = media_entity_to_v4l2_subdev(pad->entity);
        pdata = sensor->host_priv;
 
index 783f4b05b153703ef1a7504743102f0d41617803..6db245d84bbbe5f8e27bc9fb1555e2bdf0f20d0d 100644 (file)
@@ -573,7 +573,7 @@ static int csi2_configure(struct isp_csi2_device *csi2)
        if (csi2->contexts[0].enabled || csi2->ctrl.if_enable)
                return -EBUSY;
 
-       pad = media_entity_remote_source(&csi2->pads[CSI2_PAD_SINK]);
+       pad = media_entity_remote_pad(&csi2->pads[CSI2_PAD_SINK]);
        sensor = media_entity_to_v4l2_subdev(pad->entity);
        pdata = sensor->host_priv;
 
index 8dac17511e618c84d27a9db8bbfbd7587f5c1d2a..a908d006f5277c2abe9adebcbb757ea699495fbf 100644 (file)
@@ -219,7 +219,7 @@ isp_video_remote_subdev(struct isp_video *video, u32 *pad)
 {
        struct media_pad *remote;
 
-       remote = media_entity_remote_source(&video->pad);
+       remote = media_entity_remote_pad(&video->pad);
 
        if (remote == NULL ||
            media_entity_type(remote->entity) != MEDIA_ENT_T_V4L2_SUBDEV)
@@ -314,7 +314,7 @@ static int isp_video_validate_pipeline(struct isp_pipeline *pipe)
                 * entity can be found, and stop checking the pipeline if the
                 * source entity isn't a subdev.
                 */
-               pad = media_entity_remote_source(pad);
+               pad = media_entity_remote_pad(pad);
                if (pad == NULL)
                        return -EPIPE;
 
@@ -901,7 +901,7 @@ static int isp_video_check_external_subdevs(struct isp_video *video,
                        continue;
 
                /* ISP entities have always sink pad == 0. Find source. */
-               source_pad = media_entity_remote_source(&ents[i]->pads[0]);
+               source_pad = media_entity_remote_pad(&ents[i]->pads[0]);
                if (source_pad == NULL)
                        continue;
 
index 70438a0f62aea113a97bb241ee3f9a8b43d40870..40b298ab87f1669682aea3c68c70b57703af043d 100644 (file)
@@ -845,7 +845,7 @@ static int camif_pipeline_validate(struct camif_dev *camif)
        int ret;
 
        /* Retrieve format at the sensor subdev source pad */
-       pad = media_entity_remote_source(&camif->pads[0]);
+       pad = media_entity_remote_pad(&camif->pads[0]);
        if (!pad || media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV)
                return -EPIPE;
 
index ba913f1d955b04876387980aee81435ea9f48322..cb5410b390ef9268e35a553ad01b73851e1f6bbd 100644 (file)
@@ -39,7 +39,7 @@ static struct media_entity *vpfe_get_input_entity
        struct vpfe_device *vpfe_dev = video->vpfe_dev;
        struct media_pad *remote;
 
-       remote = media_entity_remote_source(&vpfe_dev->vpfe_isif.pads[0]);
+       remote = media_entity_remote_pad(&vpfe_dev->vpfe_isif.pads[0]);
        if (remote == NULL) {
                pr_err("Invalid media connection to isif/ccdc\n");
                return NULL;
@@ -56,7 +56,7 @@ static int vpfe_update_current_ext_subdev(struct vpfe_video_device *video)
        struct media_pad *remote;
        int i;
 
-       remote = media_entity_remote_source(&vpfe_dev->vpfe_isif.pads[0]);
+       remote = media_entity_remote_pad(&vpfe_dev->vpfe_isif.pads[0]);
        if (remote == NULL) {
                pr_err("Invalid media connection to isif/ccdc\n");
                return -EINVAL;
@@ -89,7 +89,7 @@ static int vpfe_update_current_ext_subdev(struct vpfe_video_device *video)
 static struct v4l2_subdev *
 vpfe_video_remote_subdev(struct vpfe_video_device *video, u32 *pad)
 {
-       struct media_pad *remote = media_entity_remote_source(&video->pad);
+       struct media_pad *remote = media_entity_remote_pad(&video->pad);
 
        if (remote == NULL || remote->entity->type != MEDIA_ENT_T_V4L2_SUBDEV)
                return NULL;
@@ -114,7 +114,7 @@ __vpfe_video_get_format(struct vpfe_video_device *video,
                return -EINVAL;
 
        fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE;
-       remote = media_entity_remote_source(&video->pad);
+       remote = media_entity_remote_pad(&video->pad);
        fmt.pad = remote->index;
 
        ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt);
@@ -245,7 +245,7 @@ static int vpfe_video_validate_pipeline(struct vpfe_pipeline *pipe)
                        return -EPIPE;
 
                /* Retrieve the source format */
-               pad = media_entity_remote_source(pad);
+               pad = media_entity_remote_pad(pad);
                if (pad == NULL ||
                        pad->entity->type != MEDIA_ENT_T_V4L2_SUBDEV)
                        break;
@@ -667,7 +667,7 @@ static int vpfe_enum_fmt(struct file *file, void  *priv,
                return -EINVAL;
        }
        /* get the remote pad */
-       remote = media_entity_remote_source(&video->pad);
+       remote = media_entity_remote_pad(&video->pad);
        if (remote == NULL) {
                v4l2_err(&vpfe_dev->v4l2_dev,
                         "invalid remote pad for video node\n");
index 0c16f518ee092c50d2af5fd96099e9527fa57486..4eefedcaa66d60cc959764035c13e89d48e6676f 100644 (file)
@@ -132,7 +132,7 @@ int __media_entity_setup_link(struct media_link *link, u32 flags);
 int media_entity_setup_link(struct media_link *link, u32 flags);
 struct media_link *media_entity_find_link(struct media_pad *source,
                struct media_pad *sink);
-struct media_pad *media_entity_remote_source(struct media_pad *pad);
+struct media_pad *media_entity_remote_pad(struct media_pad *pad);
 
 struct media_entity *media_entity_get(struct media_entity *entity);
 void media_entity_put(struct media_entity *entity);