[media] media: rename the function that create pad links
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 7 Aug 2015 11:14:38 +0000 (08:14 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 11 Jan 2016 14:18:43 +0000 (12:18 -0200)
With the new API, a link can be either between two PADs or between an interface
and an entity. So, we need to use a better name for the function that create
links between two pads.

So, rename the such function to media_create_pad_link().

No functional changes.

This patch was created via this shell script:
for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f) $(find include/ -name '*.h' -type f) ; do sed s,media_entity_create_link,media_create_pad_link,g <$i >a && mv a $i; done

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
30 files changed:
Documentation/media-framework.txt
drivers/media/dvb-core/dvbdev.c
drivers/media/i2c/s5c73m3/s5c73m3-core.c
drivers/media/i2c/s5k5baf.c
drivers/media/i2c/smiapp/smiapp-core.c
drivers/media/media-entity.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/isppreview.c
drivers/media/platform/omap3isp/ispresizer.c
drivers/media/platform/s3c-camif/camif-core.c
drivers/media/platform/vsp1/vsp1_drv.c
drivers/media/platform/vsp1/vsp1_rpf.c
drivers/media/platform/vsp1/vsp1_wpf.c
drivers/media/platform/xilinx/xilinx-vipp.c
drivers/media/usb/au0828/au0828-core.c
drivers/media/usb/cx231xx/cx231xx-cards.c
drivers/media/usb/uvc/uvc_entity.c
drivers/staging/media/davinci_vpfe/dm365_ipipeif.c
drivers/staging/media/davinci_vpfe/dm365_isif.c
drivers/staging/media/davinci_vpfe/dm365_resizer.c
drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c
drivers/staging/media/omap4iss/iss.c
drivers/staging/media/omap4iss/iss_csi2.c
drivers/staging/media/omap4iss/iss_ipipeif.c
drivers/staging/media/omap4iss/iss_resizer.c
include/media/media-entity.h

index 6903b25035774fe60143a214481600239a18379d..b424de6c3bb330156e247206cc4ade6a4b471b6a 100644 (file)
@@ -199,7 +199,7 @@ pre-allocated and grows dynamically as needed.
 
 Drivers create links by calling
 
-       media_entity_create_link(struct media_entity *source, u16 source_pad,
+       media_create_pad_link(struct media_entity *source, u16 source_pad,
                                 struct media_entity *sink,   u16 sink_pad,
                                 u32 flags);
 
index 2fdcbb5f000a95e10ac775cbc8337cad03ef00a5..65f59f2124b460896fcde6087e56477615a2daad 100644 (file)
@@ -412,16 +412,16 @@ void dvb_create_media_graph(struct dvb_adapter *adap)
        }
 
        if (tuner && fe)
-               media_entity_create_link(tuner, 0, fe, 0, 0);
+               media_create_pad_link(tuner, 0, fe, 0, 0);
 
        if (fe && demux)
-               media_entity_create_link(fe, 1, demux, 0, MEDIA_LNK_FL_ENABLED);
+               media_create_pad_link(fe, 1, demux, 0, MEDIA_LNK_FL_ENABLED);
 
        if (demux && dvr)
-               media_entity_create_link(demux, 1, dvr, 0, MEDIA_LNK_FL_ENABLED);
+               media_create_pad_link(demux, 1, dvr, 0, MEDIA_LNK_FL_ENABLED);
 
        if (demux && ca)
-               media_entity_create_link(demux, 1, ca, 0, MEDIA_LNK_FL_ENABLED);
+               media_create_pad_link(demux, 1, ca, 0, MEDIA_LNK_FL_ENABLED);
 }
 EXPORT_SYMBOL_GPL(dvb_create_media_graph);
 #endif
index 381f903831f4700e5dfdb348b415b05d7b1097a0..45c823b68f489b7e6e5e402b82c01059d55396ee 100644 (file)
@@ -1482,11 +1482,11 @@ static int s5c73m3_oif_registered(struct v4l2_subdev *sd)
                return ret;
        }
 
-       ret = media_entity_create_link(&state->sensor_sd.entity,
+       ret = media_create_pad_link(&state->sensor_sd.entity,
                        S5C73M3_ISP_PAD, &state->oif_sd.entity, OIF_ISP_PAD,
                        MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED);
 
-       ret = media_entity_create_link(&state->sensor_sd.entity,
+       ret = media_create_pad_link(&state->sensor_sd.entity,
                        S5C73M3_JPEG_PAD, &state->oif_sd.entity, OIF_JPEG_PAD,
                        MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED);
 
index 30a9ca62e034dce3ed9c177836f9a3dc14792e58..d3bff30bcb6f8a5c9835c78a5edcde3187622fcd 100644 (file)
@@ -1756,7 +1756,7 @@ static int s5k5baf_registered(struct v4l2_subdev *sd)
                v4l2_err(sd, "failed to register subdev %s\n",
                         state->cis_sd.name);
        else
-               ret = media_entity_create_link(&state->cis_sd.entity, PAD_CIS,
+               ret = media_create_pad_link(&state->cis_sd.entity, PAD_CIS,
                                               &state->sd.entity, PAD_CIS,
                                               MEDIA_LNK_FL_IMMUTABLE |
                                               MEDIA_LNK_FL_ENABLED);
index 7ed0538ea8db2ae9aca275b8f3a872e1dc4a35a9..cf0cd507c2d0c3e06cb79c89a1cabfaabb410257 100644 (file)
@@ -2495,7 +2495,7 @@ static int smiapp_register_subdevs(struct smiapp_sensor *sensor)
                        return rval;
                }
 
-               rval = media_entity_create_link(&this->sd.entity,
+               rval = media_create_pad_link(&this->sd.entity,
                                                this->source_pad,
                                                &last->sd.entity,
                                                last->sink_pad,
@@ -2503,7 +2503,7 @@ static int smiapp_register_subdevs(struct smiapp_sensor *sensor)
                                                MEDIA_LNK_FL_IMMUTABLE);
                if (rval) {
                        dev_err(&client->dev,
-                               "media_entity_create_link failed\n");
+                               "media_create_pad_link failed\n");
                        return rval;
                }
 
index f5b4822a324fbf80b52205d50ae2a27228948c8e..e840da0325b71ccf29a9952f2e98259efced8e07 100644 (file)
@@ -542,7 +542,7 @@ static struct media_link *media_entity_add_link(struct media_entity *entity)
 }
 
 int
-media_entity_create_link(struct media_entity *source, u16 source_pad,
+media_create_pad_link(struct media_entity *source, u16 source_pad,
                         struct media_entity *sink, u16 sink_pad, u32 flags)
 {
        struct media_link *link;
@@ -586,7 +586,7 @@ media_entity_create_link(struct media_entity *source, u16 source_pad,
 
        return 0;
 }
-EXPORT_SYMBOL_GPL(media_entity_create_link);
+EXPORT_SYMBOL_GPL(media_create_pad_link);
 
 void __media_entity_remove_links(struct media_entity *entity)
 {
index 9481ce3201a2c021be254fa7975f22abf997051e..4c524a02c59c65c58f7eb0efb0258d6cb7dce6af 100644 (file)
@@ -729,7 +729,7 @@ static int __fimc_md_create_fimc_sink_links(struct fimc_md *fmd,
                flags = ((1 << i) & link_mask) ? MEDIA_LNK_FL_ENABLED : 0;
 
                sink = &fmd->fimc[i]->vid_cap.subdev.entity;
-               ret = media_entity_create_link(source, pad, sink,
+               ret = media_create_pad_link(source, pad, sink,
                                              FIMC_SD_PAD_SINK_CAM, flags);
                if (ret)
                        return ret;
@@ -749,7 +749,7 @@ static int __fimc_md_create_fimc_sink_links(struct fimc_md *fmd,
                        continue;
 
                sink = &fmd->fimc_lite[i]->subdev.entity;
-               ret = media_entity_create_link(source, pad, sink,
+               ret = media_create_pad_link(source, pad, sink,
                                               FLITE_SD_PAD_SINK, 0);
                if (ret)
                        return ret;
@@ -781,13 +781,13 @@ static int __fimc_md_create_flite_source_links(struct fimc_md *fmd)
                source = &fimc->subdev.entity;
                sink = &fimc->ve.vdev.entity;
                /* FIMC-LITE's subdev and video node */
-               ret = media_entity_create_link(source, FLITE_SD_PAD_SOURCE_DMA,
+               ret = media_create_pad_link(source, FLITE_SD_PAD_SOURCE_DMA,
                                               sink, 0, 0);
                if (ret)
                        break;
                /* Link from FIMC-LITE to IS-ISP subdev */
                sink = &fmd->fimc_is->isp.subdev.entity;
-               ret = media_entity_create_link(source, FLITE_SD_PAD_SOURCE_ISP,
+               ret = media_create_pad_link(source, FLITE_SD_PAD_SOURCE_ISP,
                                               sink, 0, 0);
                if (ret)
                        break;
@@ -811,7 +811,7 @@ static int __fimc_md_create_fimc_is_links(struct fimc_md *fmd)
 
                /* Link from FIMC-IS-ISP subdev to FIMC */
                sink = &fmd->fimc[i]->vid_cap.subdev.entity;
-               ret = media_entity_create_link(source, FIMC_ISP_SD_PAD_SRC_FIFO,
+               ret = media_create_pad_link(source, FIMC_ISP_SD_PAD_SRC_FIFO,
                                               sink, FIMC_SD_PAD_SINK_FIFO, 0);
                if (ret)
                        return ret;
@@ -824,7 +824,7 @@ static int __fimc_md_create_fimc_is_links(struct fimc_md *fmd)
        if (sink->num_pads == 0)
                return 0;
 
-       return media_entity_create_link(source, FIMC_ISP_SD_PAD_SRC_DMA,
+       return media_create_pad_link(source, FIMC_ISP_SD_PAD_SRC_DMA,
                                        sink, 0, 0);
 }
 
@@ -873,7 +873,7 @@ static int fimc_md_create_links(struct fimc_md *fmd)
                                return -EINVAL;
 
                        pad = sensor->entity.num_pads - 1;
-                       ret = media_entity_create_link(&sensor->entity, pad,
+                       ret = media_create_pad_link(&sensor->entity, pad,
                                              &csis->entity, CSIS_PAD_SINK,
                                              MEDIA_LNK_FL_IMMUTABLE |
                                              MEDIA_LNK_FL_ENABLED);
@@ -927,7 +927,7 @@ static int fimc_md_create_links(struct fimc_md *fmd)
                source = &fmd->fimc[i]->vid_cap.subdev.entity;
                sink = &fmd->fimc[i]->vid_cap.ve.vdev.entity;
 
-               ret = media_entity_create_link(source, FIMC_SD_PAD_SOURCE,
+               ret = media_create_pad_link(source, FIMC_SD_PAD_SOURCE,
                                              sink, 0, flags);
                if (ret)
                        break;
index e08183f9d0f78ea874607b19749e50bc0e369173..6351f35b0a6565ff43c5882ef87d68b7ded9a082 100644 (file)
@@ -1865,7 +1865,7 @@ static int isp_link_entity(
                return -EINVAL;
        }
 
-       return media_entity_create_link(entity, i, input, pad, flags);
+       return media_create_pad_link(entity, i, input, pad, flags);
 }
 
 static int isp_register_entities(struct isp_device *isp)
@@ -2004,51 +2004,51 @@ static int isp_initialize_modules(struct isp_device *isp)
        }
 
        /* Connect the submodules. */
-       ret = media_entity_create_link(
+       ret = media_create_pad_link(
                        &isp->isp_csi2a.subdev.entity, CSI2_PAD_SOURCE,
                        &isp->isp_ccdc.subdev.entity, CCDC_PAD_SINK, 0);
        if (ret < 0)
                goto error_link;
 
-       ret = media_entity_create_link(
+       ret = media_create_pad_link(
                        &isp->isp_ccp2.subdev.entity, CCP2_PAD_SOURCE,
                        &isp->isp_ccdc.subdev.entity, CCDC_PAD_SINK, 0);
        if (ret < 0)
                goto error_link;
 
-       ret = media_entity_create_link(
+       ret = media_create_pad_link(
                        &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP,
                        &isp->isp_prev.subdev.entity, PREV_PAD_SINK, 0);
        if (ret < 0)
                goto error_link;
 
-       ret = media_entity_create_link(
+       ret = media_create_pad_link(
                        &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_OF,
                        &isp->isp_res.subdev.entity, RESZ_PAD_SINK, 0);
        if (ret < 0)
                goto error_link;
 
-       ret = media_entity_create_link(
+       ret = media_create_pad_link(
                        &isp->isp_prev.subdev.entity, PREV_PAD_SOURCE,
                        &isp->isp_res.subdev.entity, RESZ_PAD_SINK, 0);
        if (ret < 0)
                goto error_link;
 
-       ret = media_entity_create_link(
+       ret = media_create_pad_link(
                        &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP,
                        &isp->isp_aewb.subdev.entity, 0,
                        MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE);
        if (ret < 0)
                goto error_link;
 
-       ret = media_entity_create_link(
+       ret = media_create_pad_link(
                        &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP,
                        &isp->isp_af.subdev.entity, 0,
                        MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE);
        if (ret < 0)
                goto error_link;
 
-       ret = media_entity_create_link(
+       ret = media_create_pad_link(
                        &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP,
                        &isp->isp_hist.subdev.entity, 0,
                        MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE);
index d96e3be5e252f0d87aea3719d818b565e572cd0f..27555e4f4aa82ddd15d5dbfad18643a72e422762 100644 (file)
@@ -2667,7 +2667,7 @@ static int ccdc_init_entities(struct isp_ccdc_device *ccdc)
                goto error_video;
 
        /* Connect the CCDC subdev to the video node. */
-       ret = media_entity_create_link(&ccdc->subdev.entity, CCDC_PAD_SOURCE_OF,
+       ret = media_create_pad_link(&ccdc->subdev.entity, CCDC_PAD_SOURCE_OF,
                        &ccdc->video_out.video.entity, 0, 0);
        if (ret < 0)
                goto error_link;
index e1b5f5bea541fbd9adc50c6b9795cf5a7d94f2eb..b215eb5049d65a67011aa858f3eca144786390fe 100644 (file)
@@ -1100,7 +1100,7 @@ static int ccp2_init_entities(struct isp_ccp2_device *ccp2)
                goto error_video;
 
        /* Connect the video node to the ccp2 subdev. */
-       ret = media_entity_create_link(&ccp2->video_in.video.entity, 0,
+       ret = media_create_pad_link(&ccp2->video_in.video.entity, 0,
                                       &ccp2->subdev.entity, CCP2_PAD_SINK, 0);
        if (ret < 0)
                goto error_link;
index 6fff92f0813a035eb936f81160d22354870b247d..fcefc1e74881f6a86f43592e9e6c9287c5bfaa11 100644 (file)
@@ -1265,7 +1265,7 @@ static int csi2_init_entities(struct isp_csi2_device *csi2)
                goto error_video;
 
        /* Connect the CSI2 subdev to the video node. */
-       ret = media_entity_create_link(&csi2->subdev.entity, CSI2_PAD_SOURCE,
+       ret = media_create_pad_link(&csi2->subdev.entity, CSI2_PAD_SOURCE,
                                       &csi2->video_out.video.entity, 0, 0);
        if (ret < 0)
                goto error_link;
index b440c6342ca49675be172ed80923638bdc08e96b..ad38d20c7770252efb00943180aa6ed7951d7a24 100644 (file)
@@ -2312,12 +2312,12 @@ static int preview_init_entities(struct isp_prev_device *prev)
                goto error_video_out;
 
        /* Connect the video nodes to the previewer subdev. */
-       ret = media_entity_create_link(&prev->video_in.video.entity, 0,
+       ret = media_create_pad_link(&prev->video_in.video.entity, 0,
                        &prev->subdev.entity, PREV_PAD_SINK, 0);
        if (ret < 0)
                goto error_link;
 
-       ret = media_entity_create_link(&prev->subdev.entity, PREV_PAD_SOURCE,
+       ret = media_create_pad_link(&prev->subdev.entity, PREV_PAD_SOURCE,
                        &prev->video_out.video.entity, 0, 0);
        if (ret < 0)
                goto error_link;
index 3deb1ec4a973a2b20050f86071d4dae97836b34c..b48ad4d4b8349109cbdc3ca9b2711556992e39b6 100644 (file)
@@ -1756,12 +1756,12 @@ 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_entity_create_link(&res->video_in.video.entity, 0,
+       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_entity_create_link(&res->subdev.entity, RESZ_PAD_SOURCE,
+       ret = media_create_pad_link(&res->subdev.entity, RESZ_PAD_SOURCE,
                        &res->video_out.video.entity, 0, 0);
        if (ret < 0)
                goto error_link;
index 1ba9bb08f5da2a04a578416c2893baf1755ccbd6..8649d4c0e90d5ddc82e2f69b734ba57ec108841d 100644 (file)
@@ -263,7 +263,7 @@ static int camif_create_media_links(struct camif_dev *camif)
 {
        int i, ret;
 
-       ret = media_entity_create_link(&camif->sensor.sd->entity, 0,
+       ret = media_create_pad_link(&camif->sensor.sd->entity, 0,
                                &camif->subdev.entity, CAMIF_SD_PAD_SINK,
                                MEDIA_LNK_FL_IMMUTABLE |
                                MEDIA_LNK_FL_ENABLED);
@@ -271,7 +271,7 @@ static int camif_create_media_links(struct camif_dev *camif)
                return ret;
 
        for (i = 1; i < CAMIF_SD_PADS_NUM && !ret; i++) {
-               ret = media_entity_create_link(&camif->subdev.entity, i,
+               ret = media_create_pad_link(&camif->subdev.entity, i,
                                &camif->vp[i - 1].vdev.entity, 0,
                                MEDIA_LNK_FL_IMMUTABLE |
                                MEDIA_LNK_FL_ENABLED);
index 4e61886384e329bfa7fba8133ff73128eccfe7a7..9cd94a76a9ed2b1a95370c61f6e86f7666fd2cb3 100644 (file)
@@ -101,7 +101,7 @@ static int vsp1_create_links(struct vsp1_device *vsp1, struct vsp1_entity *sink)
                        if (!(entity->pads[pad].flags & MEDIA_PAD_FL_SINK))
                                continue;
 
-                       ret = media_entity_create_link(&source->subdev.entity,
+                       ret = media_create_pad_link(&source->subdev.entity,
                                                       source->source_pad,
                                                       entity, pad, flags);
                        if (ret < 0)
@@ -262,7 +262,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
        }
 
        if (vsp1->pdata.features & VSP1_HAS_LIF) {
-               ret = media_entity_create_link(
+               ret = media_create_pad_link(
                        &vsp1->wpf[0]->entity.subdev.entity, RWPF_PAD_SOURCE,
                        &vsp1->lif->entity.subdev.entity, LIF_PAD_SINK, 0);
                if (ret < 0)
index cd5248a9a271160b948002d502cac66419fa2296..1bd51d22ff0446b21e17877f6112c1fce449faa9 100644 (file)
@@ -278,7 +278,7 @@ struct vsp1_rwpf *vsp1_rpf_create(struct vsp1_device *vsp1, unsigned int index)
        rpf->entity.video = video;
 
        /* Connect the video device to the RPF. */
-       ret = media_entity_create_link(&rpf->video.video.entity, 0,
+       ret = media_create_pad_link(&rpf->video.video.entity, 0,
                                       &rpf->entity.subdev.entity,
                                       RWPF_PAD_SINK,
                                       MEDIA_LNK_FL_ENABLED |
index 95b62f4f77e7850cc9775d22501abb17639fed60..ca19c534dac6decde0468172946d4a32e71564a9 100644 (file)
@@ -284,7 +284,7 @@ struct vsp1_rwpf *vsp1_wpf_create(struct vsp1_device *vsp1, unsigned int index)
        if (!(vsp1->pdata.features & VSP1_HAS_LIF) || index != 0)
                flags |= MEDIA_LNK_FL_IMMUTABLE;
 
-       ret = media_entity_create_link(&wpf->entity.subdev.entity,
+       ret = media_create_pad_link(&wpf->entity.subdev.entity,
                                       RWPF_PAD_SOURCE,
                                       &wpf->video.video.entity, 0, flags);
        if (ret < 0)
index b9bf24fefa5a6aee0c068cc1ab684062819c6a16..2352f7e5a6a3d676a5db2d3ca4e545adc871d708 100644 (file)
@@ -156,7 +156,7 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev,
                        local->name, local_pad->index,
                        remote->name, remote_pad->index);
 
-               ret = media_entity_create_link(local, local_pad->index,
+               ret = media_create_pad_link(local, local_pad->index,
                                               remote, remote_pad->index,
                                               link_flags);
                if (ret < 0) {
@@ -270,7 +270,7 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev)
                        source->name, source_pad->index,
                        sink->name, sink_pad->index);
 
-               ret = media_entity_create_link(source, source_pad->index,
+               ret = media_create_pad_link(source, source_pad->index,
                                               sink, sink_pad->index,
                                               link_flags);
                if (ret < 0) {
index 0378a2c99ebb4fd11a9b1fb6f7cd89ec0e906a8a..a55eb524ea21f52f65d871218de6407fb3a40487 100644 (file)
@@ -260,13 +260,13 @@ static void au0828_create_media_graph(struct au0828_dev *dev)
                return;
 
        if (tuner)
-               media_entity_create_link(tuner, 0, decoder, 0,
+               media_create_pad_link(tuner, 0, decoder, 0,
                                         MEDIA_LNK_FL_ENABLED);
        if (dev->vdev.entity.links)
-               media_entity_create_link(decoder, 1, &dev->vdev.entity, 0,
+               media_create_pad_link(decoder, 1, &dev->vdev.entity, 0,
                                 MEDIA_LNK_FL_ENABLED);
        if (dev->vbi_dev.entity.links)
-               media_entity_create_link(decoder, 2, &dev->vbi_dev.entity, 0,
+               media_create_pad_link(decoder, 2, &dev->vbi_dev.entity, 0,
                                 MEDIA_LNK_FL_ENABLED);
 #endif
 }
index 89dc695c696e5b154b6543f2b85c83459b13a622..695f0c092c794c6a6bab45d504fc2799a40084f8 100644 (file)
@@ -1264,11 +1264,11 @@ static void cx231xx_create_media_graph(struct cx231xx *dev)
                return;
 
        if (tuner)
-               media_entity_create_link(tuner, 0, decoder, 0,
+               media_create_pad_link(tuner, 0, decoder, 0,
                                         MEDIA_LNK_FL_ENABLED);
-       media_entity_create_link(decoder, 1, &dev->vdev.entity, 0,
+       media_create_pad_link(decoder, 1, &dev->vdev.entity, 0,
                                 MEDIA_LNK_FL_ENABLED);
-       media_entity_create_link(decoder, 2, &dev->vbi_dev.entity, 0,
+       media_create_pad_link(decoder, 2, &dev->vbi_dev.entity, 0,
                                 MEDIA_LNK_FL_ENABLED);
 #endif
 }
index 245445491516179cf28b12caccb0a4f4c83b5b34..429e428ccd93fffcc15e5a607ad2a2625ac45aa7 100644 (file)
@@ -56,7 +56,7 @@ static int uvc_mc_register_entity(struct uvc_video_chain *chain,
                        continue;
 
                remote_pad = remote->num_pads - 1;
-               ret = media_entity_create_link(source, remote_pad,
+               ret = media_create_pad_link(source, remote_pad,
                                               sink, i, flags);
                if (ret < 0)
                        return ret;
index 8fb6761868986b2b060fbc5bd7534f3fb2f607e8..d96bdaaae50e5014272711892a236de0d81a0786 100644 (file)
@@ -971,7 +971,7 @@ vpfe_ipipeif_register_entities(struct vpfe_ipipeif_device *ipipeif,
        ipipeif->video_in.vpfe_dev = vpfe_dev;
 
        flags = 0;
-       ret = media_entity_create_link(&ipipeif->video_in.video_dev.entity, 0,
+       ret = media_create_pad_link(&ipipeif->video_in.video_dev.entity, 0,
                                        &ipipeif->subdev.entity, 0, flags);
        if (ret < 0)
                goto fail;
index b1f01adfa7c83392af0e8f479eab1c5cc790f89d..df77288b0ec028b7646a5c10e66daa694f920543 100644 (file)
@@ -1817,7 +1817,7 @@ int vpfe_isif_register_entities(struct vpfe_isif_device *isif,
        isif->video_out.vpfe_dev = vpfe_dev;
        flags = 0;
        /* connect isif to video node */
-       ret = media_entity_create_link(&isif->subdev.entity, 1,
+       ret = media_create_pad_link(&isif->subdev.entity, 1,
                                       &isif->video_out.video_dev.entity,
                                       0, flags);
        if (ret < 0)
index 7275cf3d6c20e49bfd7e5ccfa110ee2ce10d8579..50c8725c5aa60b4aceeaa4bce5ff38a77938d2a3 100644 (file)
@@ -1826,27 +1826,27 @@ int vpfe_resizer_register_entities(struct vpfe_resizer_device *resizer,
        resizer->resizer_b.video_out.vpfe_dev = vpfe_dev;
 
        /* create link between Resizer Crop----> Resizer A*/
-       ret = media_entity_create_link(&resizer->crop_resizer.subdev.entity, 1,
+       ret = media_create_pad_link(&resizer->crop_resizer.subdev.entity, 1,
                                &resizer->resizer_a.subdev.entity,
                                0, flags);
        if (ret < 0)
                goto out_create_link;
 
        /* create link between Resizer Crop----> Resizer B*/
-       ret = media_entity_create_link(&resizer->crop_resizer.subdev.entity, 2,
+       ret = media_create_pad_link(&resizer->crop_resizer.subdev.entity, 2,
                                &resizer->resizer_b.subdev.entity,
                                0, flags);
        if (ret < 0)
                goto out_create_link;
 
        /* create link between Resizer A ----> video out */
-       ret = media_entity_create_link(&resizer->resizer_a.subdev.entity, 1,
+       ret = media_create_pad_link(&resizer->resizer_a.subdev.entity, 1,
                &resizer->resizer_a.video_out.video_dev.entity, 0, flags);
        if (ret < 0)
                goto out_create_link;
 
        /* create link between Resizer B ----> video out */
-       ret = media_entity_create_link(&resizer->resizer_b.subdev.entity, 1,
+       ret = media_create_pad_link(&resizer->resizer_b.subdev.entity, 1,
                &resizer->resizer_b.video_out.video_dev.entity, 0, flags);
        if (ret < 0)
                goto out_create_link;
index 69b678ca40c06a3a13c435aba2876b714ae642de..ec46f366dd1796f86ce7ad692abd9de7e46ee545 100644 (file)
@@ -445,32 +445,32 @@ static int vpfe_register_entities(struct vpfe_device *vpfe_dev)
                /* if entity has no pads (ex: amplifier),
                   cant establish link */
                if (vpfe_dev->sd[i]->entity.num_pads) {
-                       ret = media_entity_create_link(&vpfe_dev->sd[i]->entity,
+                       ret = media_create_pad_link(&vpfe_dev->sd[i]->entity,
                                0, &vpfe_dev->vpfe_isif.subdev.entity,
                                0, flags);
                        if (ret < 0)
                                goto out_resizer_register;
                }
 
-       ret = media_entity_create_link(&vpfe_dev->vpfe_isif.subdev.entity, 1,
+       ret = media_create_pad_link(&vpfe_dev->vpfe_isif.subdev.entity, 1,
                                       &vpfe_dev->vpfe_ipipeif.subdev.entity,
                                       0, flags);
        if (ret < 0)
                goto out_resizer_register;
 
-       ret = media_entity_create_link(&vpfe_dev->vpfe_ipipeif.subdev.entity, 1,
+       ret = media_create_pad_link(&vpfe_dev->vpfe_ipipeif.subdev.entity, 1,
                                       &vpfe_dev->vpfe_ipipe.subdev.entity,
                                       0, flags);
        if (ret < 0)
                goto out_resizer_register;
 
-       ret = media_entity_create_link(&vpfe_dev->vpfe_ipipe.subdev.entity,
+       ret = media_create_pad_link(&vpfe_dev->vpfe_ipipe.subdev.entity,
                        1, &vpfe_dev->vpfe_resizer.crop_resizer.subdev.entity,
                        0, flags);
        if (ret < 0)
                goto out_resizer_register;
 
-       ret = media_entity_create_link(&vpfe_dev->vpfe_ipipeif.subdev.entity, 1,
+       ret = media_create_pad_link(&vpfe_dev->vpfe_ipipeif.subdev.entity, 1,
                        &vpfe_dev->vpfe_resizer.crop_resizer.subdev.entity,
                        0, flags);
        if (ret < 0)
index 5fc3675b190f4e60affd9bc2945d8dbfc16719a8..60e67fadcac18eebe1f71f7bb94f218481df347a 100644 (file)
@@ -1259,7 +1259,7 @@ static int iss_register_entities(struct iss_device *iss)
                        goto done;
                }
 
-               ret = media_entity_create_link(&sensor->entity, 0, input, pad,
+               ret = media_create_pad_link(&sensor->entity, 0, input, pad,
                                               flags);
                if (ret < 0)
                        goto done;
@@ -1317,31 +1317,31 @@ static int iss_initialize_modules(struct iss_device *iss)
        }
 
        /* Connect the submodules. */
-       ret = media_entity_create_link(
+       ret = media_create_pad_link(
                        &iss->csi2a.subdev.entity, CSI2_PAD_SOURCE,
                        &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SINK, 0);
        if (ret < 0)
                goto error_link;
 
-       ret = media_entity_create_link(
+       ret = media_create_pad_link(
                        &iss->csi2b.subdev.entity, CSI2_PAD_SOURCE,
                        &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SINK, 0);
        if (ret < 0)
                goto error_link;
 
-       ret = media_entity_create_link(
+       ret = media_create_pad_link(
                        &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SOURCE_VP,
                        &iss->resizer.subdev.entity, RESIZER_PAD_SINK, 0);
        if (ret < 0)
                goto error_link;
 
-       ret = media_entity_create_link(
+       ret = media_create_pad_link(
                        &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SOURCE_VP,
                        &iss->ipipe.subdev.entity, IPIPE_PAD_SINK, 0);
        if (ret < 0)
                goto error_link;
 
-       ret = media_entity_create_link(
+       ret = media_create_pad_link(
                        &iss->ipipe.subdev.entity, IPIPE_PAD_SOURCE_VP,
                        &iss->resizer.subdev.entity, RESIZER_PAD_SINK, 0);
        if (ret < 0)
index 86111e39a7283f134e0e2cd4f53bef5e558adf6a..c6eb5a7a593f35bd8d744a3efb58fec7f09528ed 100644 (file)
@@ -1291,7 +1291,7 @@ static int csi2_init_entities(struct iss_csi2_device *csi2, const char *subname)
                goto error_video;
 
        /* Connect the CSI2 subdev to the video node. */
-       ret = media_entity_create_link(&csi2->subdev.entity, CSI2_PAD_SOURCE,
+       ret = media_create_pad_link(&csi2->subdev.entity, CSI2_PAD_SOURCE,
                                       &csi2->video_out.video.entity, 0, 0);
        if (ret < 0)
                goto error_link;
index d031a5f22cdcb5a0f96018a80eb47c3f1b35b337..b0c5f2431b62635f4fcc9dfa0543711aac07902c 100644 (file)
@@ -762,7 +762,7 @@ static int ipipeif_init_entities(struct iss_ipipeif_device *ipipeif)
                return ret;
 
        /* Connect the IPIPEIF subdev to the video node. */
-       ret = media_entity_create_link(&ipipeif->subdev.entity,
+       ret = media_create_pad_link(&ipipeif->subdev.entity,
                                       IPIPEIF_PAD_SOURCE_ISIF_SF,
                                       &ipipeif->video_out.video.entity, 0, 0);
        if (ret < 0)
index 11031d9de3ab44e7afdba4a138cf26eacbb0cd26..a2cb57cb460dad35951c380a3991e6a2075988ec 100644 (file)
@@ -804,7 +804,7 @@ static int resizer_init_entities(struct iss_resizer_device *resizer)
                return ret;
 
        /* Connect the RESIZER subdev to the video node. */
-       ret = media_entity_create_link(&resizer->subdev.entity,
+       ret = media_create_pad_link(&resizer->subdev.entity,
                                       RESIZER_PAD_SOURCE_MEM,
                                       &resizer->video_out.video.entity, 0, 0);
        if (ret < 0)
index 96a5d3e6f6f43e4dd073405190fed722728f05e5..ad9e16e5e44dccf097276d084d5cffeab7cfaed1 100644 (file)
@@ -215,7 +215,7 @@ int media_entity_init(struct media_entity *entity, u16 num_pads,
                struct media_pad *pads);
 void media_entity_cleanup(struct media_entity *entity);
 
-int media_entity_create_link(struct media_entity *source, u16 source_pad,
+int media_create_pad_link(struct media_entity *source, u16 source_pad,
                struct media_entity *sink, u16 sink_pad, u32 flags);
 void __media_entity_remove_links(struct media_entity *entity);
 void media_entity_remove_links(struct media_entity *entity);