diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-08-07 07:14:38 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 09:18:43 -0500 |
commit | 8df00a15817e3a252510ac914870214859325189 (patch) | |
tree | 06e394e0020ef637b79715a1244fa5c9f651eb1d | |
parent | 39a956c4147e4f696f729916f677673e9a9dc7ab (diff) |
[media] media: rename the function that create pad links
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, 72 insertions, 72 deletions
diff --git a/Documentation/media-framework.txt b/Documentation/media-framework.txt index 6903b2503577..b424de6c3bb3 100644 --- a/Documentation/media-framework.txt +++ b/Documentation/media-framework.txt | |||
@@ -199,7 +199,7 @@ pre-allocated and grows dynamically as needed. | |||
199 | 199 | ||
200 | Drivers create links by calling | 200 | Drivers create links by calling |
201 | 201 | ||
202 | media_entity_create_link(struct media_entity *source, u16 source_pad, | 202 | media_create_pad_link(struct media_entity *source, u16 source_pad, |
203 | struct media_entity *sink, u16 sink_pad, | 203 | struct media_entity *sink, u16 sink_pad, |
204 | u32 flags); | 204 | u32 flags); |
205 | 205 | ||
diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c index 2fdcbb5f000a..65f59f2124b4 100644 --- a/drivers/media/dvb-core/dvbdev.c +++ b/drivers/media/dvb-core/dvbdev.c | |||
@@ -412,16 +412,16 @@ void dvb_create_media_graph(struct dvb_adapter *adap) | |||
412 | } | 412 | } |
413 | 413 | ||
414 | if (tuner && fe) | 414 | if (tuner && fe) |
415 | media_entity_create_link(tuner, 0, fe, 0, 0); | 415 | media_create_pad_link(tuner, 0, fe, 0, 0); |
416 | 416 | ||
417 | if (fe && demux) | 417 | if (fe && demux) |
418 | media_entity_create_link(fe, 1, demux, 0, MEDIA_LNK_FL_ENABLED); | 418 | media_create_pad_link(fe, 1, demux, 0, MEDIA_LNK_FL_ENABLED); |
419 | 419 | ||
420 | if (demux && dvr) | 420 | if (demux && dvr) |
421 | media_entity_create_link(demux, 1, dvr, 0, MEDIA_LNK_FL_ENABLED); | 421 | media_create_pad_link(demux, 1, dvr, 0, MEDIA_LNK_FL_ENABLED); |
422 | 422 | ||
423 | if (demux && ca) | 423 | if (demux && ca) |
424 | media_entity_create_link(demux, 1, ca, 0, MEDIA_LNK_FL_ENABLED); | 424 | media_create_pad_link(demux, 1, ca, 0, MEDIA_LNK_FL_ENABLED); |
425 | } | 425 | } |
426 | EXPORT_SYMBOL_GPL(dvb_create_media_graph); | 426 | EXPORT_SYMBOL_GPL(dvb_create_media_graph); |
427 | #endif | 427 | #endif |
diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c index 381f903831f4..45c823b68f48 100644 --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c | |||
@@ -1482,11 +1482,11 @@ static int s5c73m3_oif_registered(struct v4l2_subdev *sd) | |||
1482 | return ret; | 1482 | return ret; |
1483 | } | 1483 | } |
1484 | 1484 | ||
1485 | ret = media_entity_create_link(&state->sensor_sd.entity, | 1485 | ret = media_create_pad_link(&state->sensor_sd.entity, |
1486 | S5C73M3_ISP_PAD, &state->oif_sd.entity, OIF_ISP_PAD, | 1486 | S5C73M3_ISP_PAD, &state->oif_sd.entity, OIF_ISP_PAD, |
1487 | MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED); | 1487 | MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED); |
1488 | 1488 | ||
1489 | ret = media_entity_create_link(&state->sensor_sd.entity, | 1489 | ret = media_create_pad_link(&state->sensor_sd.entity, |
1490 | S5C73M3_JPEG_PAD, &state->oif_sd.entity, OIF_JPEG_PAD, | 1490 | S5C73M3_JPEG_PAD, &state->oif_sd.entity, OIF_JPEG_PAD, |
1491 | MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED); | 1491 | MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED); |
1492 | 1492 | ||
diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c index 30a9ca62e034..d3bff30bcb6f 100644 --- a/drivers/media/i2c/s5k5baf.c +++ b/drivers/media/i2c/s5k5baf.c | |||
@@ -1756,7 +1756,7 @@ static int s5k5baf_registered(struct v4l2_subdev *sd) | |||
1756 | v4l2_err(sd, "failed to register subdev %s\n", | 1756 | v4l2_err(sd, "failed to register subdev %s\n", |
1757 | state->cis_sd.name); | 1757 | state->cis_sd.name); |
1758 | else | 1758 | else |
1759 | ret = media_entity_create_link(&state->cis_sd.entity, PAD_CIS, | 1759 | ret = media_create_pad_link(&state->cis_sd.entity, PAD_CIS, |
1760 | &state->sd.entity, PAD_CIS, | 1760 | &state->sd.entity, PAD_CIS, |
1761 | MEDIA_LNK_FL_IMMUTABLE | | 1761 | MEDIA_LNK_FL_IMMUTABLE | |
1762 | MEDIA_LNK_FL_ENABLED); | 1762 | MEDIA_LNK_FL_ENABLED); |
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 7ed0538ea8db..cf0cd507c2d0 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c | |||
@@ -2495,7 +2495,7 @@ static int smiapp_register_subdevs(struct smiapp_sensor *sensor) | |||
2495 | return rval; | 2495 | return rval; |
2496 | } | 2496 | } |
2497 | 2497 | ||
2498 | rval = media_entity_create_link(&this->sd.entity, | 2498 | rval = media_create_pad_link(&this->sd.entity, |
2499 | this->source_pad, | 2499 | this->source_pad, |
2500 | &last->sd.entity, | 2500 | &last->sd.entity, |
2501 | last->sink_pad, | 2501 | last->sink_pad, |
@@ -2503,7 +2503,7 @@ static int smiapp_register_subdevs(struct smiapp_sensor *sensor) | |||
2503 | MEDIA_LNK_FL_IMMUTABLE); | 2503 | MEDIA_LNK_FL_IMMUTABLE); |
2504 | if (rval) { | 2504 | if (rval) { |
2505 | dev_err(&client->dev, | 2505 | dev_err(&client->dev, |
2506 | "media_entity_create_link failed\n"); | 2506 | "media_create_pad_link failed\n"); |
2507 | return rval; | 2507 | return rval; |
2508 | } | 2508 | } |
2509 | 2509 | ||
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index f5b4822a324f..e840da0325b7 100644 --- a/drivers/media/media-entity.c +++ b/drivers/media/media-entity.c | |||
@@ -542,7 +542,7 @@ static struct media_link *media_entity_add_link(struct media_entity *entity) | |||
542 | } | 542 | } |
543 | 543 | ||
544 | int | 544 | int |
545 | media_entity_create_link(struct media_entity *source, u16 source_pad, | 545 | media_create_pad_link(struct media_entity *source, u16 source_pad, |
546 | struct media_entity *sink, u16 sink_pad, u32 flags) | 546 | struct media_entity *sink, u16 sink_pad, u32 flags) |
547 | { | 547 | { |
548 | struct media_link *link; | 548 | struct media_link *link; |
@@ -586,7 +586,7 @@ media_entity_create_link(struct media_entity *source, u16 source_pad, | |||
586 | 586 | ||
587 | return 0; | 587 | return 0; |
588 | } | 588 | } |
589 | EXPORT_SYMBOL_GPL(media_entity_create_link); | 589 | EXPORT_SYMBOL_GPL(media_create_pad_link); |
590 | 590 | ||
591 | void __media_entity_remove_links(struct media_entity *entity) | 591 | void __media_entity_remove_links(struct media_entity *entity) |
592 | { | 592 | { |
diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c index 9481ce3201a2..4c524a02c59c 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c | |||
@@ -729,7 +729,7 @@ static int __fimc_md_create_fimc_sink_links(struct fimc_md *fmd, | |||
729 | flags = ((1 << i) & link_mask) ? MEDIA_LNK_FL_ENABLED : 0; | 729 | flags = ((1 << i) & link_mask) ? MEDIA_LNK_FL_ENABLED : 0; |
730 | 730 | ||
731 | sink = &fmd->fimc[i]->vid_cap.subdev.entity; | 731 | sink = &fmd->fimc[i]->vid_cap.subdev.entity; |
732 | ret = media_entity_create_link(source, pad, sink, | 732 | ret = media_create_pad_link(source, pad, sink, |
733 | FIMC_SD_PAD_SINK_CAM, flags); | 733 | FIMC_SD_PAD_SINK_CAM, flags); |
734 | if (ret) | 734 | if (ret) |
735 | return ret; | 735 | return ret; |
@@ -749,7 +749,7 @@ static int __fimc_md_create_fimc_sink_links(struct fimc_md *fmd, | |||
749 | continue; | 749 | continue; |
750 | 750 | ||
751 | sink = &fmd->fimc_lite[i]->subdev.entity; | 751 | sink = &fmd->fimc_lite[i]->subdev.entity; |
752 | ret = media_entity_create_link(source, pad, sink, | 752 | ret = media_create_pad_link(source, pad, sink, |
753 | FLITE_SD_PAD_SINK, 0); | 753 | FLITE_SD_PAD_SINK, 0); |
754 | if (ret) | 754 | if (ret) |
755 | return ret; | 755 | return ret; |
@@ -781,13 +781,13 @@ static int __fimc_md_create_flite_source_links(struct fimc_md *fmd) | |||
781 | source = &fimc->subdev.entity; | 781 | source = &fimc->subdev.entity; |
782 | sink = &fimc->ve.vdev.entity; | 782 | sink = &fimc->ve.vdev.entity; |
783 | /* FIMC-LITE's subdev and video node */ | 783 | /* FIMC-LITE's subdev and video node */ |
784 | ret = media_entity_create_link(source, FLITE_SD_PAD_SOURCE_DMA, | 784 | ret = media_create_pad_link(source, FLITE_SD_PAD_SOURCE_DMA, |
785 | sink, 0, 0); | 785 | sink, 0, 0); |
786 | if (ret) | 786 | if (ret) |
787 | break; | 787 | break; |
788 | /* Link from FIMC-LITE to IS-ISP subdev */ | 788 | /* Link from FIMC-LITE to IS-ISP subdev */ |
789 | sink = &fmd->fimc_is->isp.subdev.entity; | 789 | sink = &fmd->fimc_is->isp.subdev.entity; |
790 | ret = media_entity_create_link(source, FLITE_SD_PAD_SOURCE_ISP, | 790 | ret = media_create_pad_link(source, FLITE_SD_PAD_SOURCE_ISP, |
791 | sink, 0, 0); | 791 | sink, 0, 0); |
792 | if (ret) | 792 | if (ret) |
793 | break; | 793 | break; |
@@ -811,7 +811,7 @@ static int __fimc_md_create_fimc_is_links(struct fimc_md *fmd) | |||
811 | 811 | ||
812 | /* Link from FIMC-IS-ISP subdev to FIMC */ | 812 | /* Link from FIMC-IS-ISP subdev to FIMC */ |
813 | sink = &fmd->fimc[i]->vid_cap.subdev.entity; | 813 | sink = &fmd->fimc[i]->vid_cap.subdev.entity; |
814 | ret = media_entity_create_link(source, FIMC_ISP_SD_PAD_SRC_FIFO, | 814 | ret = media_create_pad_link(source, FIMC_ISP_SD_PAD_SRC_FIFO, |
815 | sink, FIMC_SD_PAD_SINK_FIFO, 0); | 815 | sink, FIMC_SD_PAD_SINK_FIFO, 0); |
816 | if (ret) | 816 | if (ret) |
817 | return ret; | 817 | return ret; |
@@ -824,7 +824,7 @@ static int __fimc_md_create_fimc_is_links(struct fimc_md *fmd) | |||
824 | if (sink->num_pads == 0) | 824 | if (sink->num_pads == 0) |
825 | return 0; | 825 | return 0; |
826 | 826 | ||
827 | return media_entity_create_link(source, FIMC_ISP_SD_PAD_SRC_DMA, | 827 | return media_create_pad_link(source, FIMC_ISP_SD_PAD_SRC_DMA, |
828 | sink, 0, 0); | 828 | sink, 0, 0); |
829 | } | 829 | } |
830 | 830 | ||
@@ -873,7 +873,7 @@ static int fimc_md_create_links(struct fimc_md *fmd) | |||
873 | return -EINVAL; | 873 | return -EINVAL; |
874 | 874 | ||
875 | pad = sensor->entity.num_pads - 1; | 875 | pad = sensor->entity.num_pads - 1; |
876 | ret = media_entity_create_link(&sensor->entity, pad, | 876 | ret = media_create_pad_link(&sensor->entity, pad, |
877 | &csis->entity, CSIS_PAD_SINK, | 877 | &csis->entity, CSIS_PAD_SINK, |
878 | MEDIA_LNK_FL_IMMUTABLE | | 878 | MEDIA_LNK_FL_IMMUTABLE | |
879 | MEDIA_LNK_FL_ENABLED); | 879 | MEDIA_LNK_FL_ENABLED); |
@@ -927,7 +927,7 @@ static int fimc_md_create_links(struct fimc_md *fmd) | |||
927 | source = &fmd->fimc[i]->vid_cap.subdev.entity; | 927 | source = &fmd->fimc[i]->vid_cap.subdev.entity; |
928 | sink = &fmd->fimc[i]->vid_cap.ve.vdev.entity; | 928 | sink = &fmd->fimc[i]->vid_cap.ve.vdev.entity; |
929 | 929 | ||
930 | ret = media_entity_create_link(source, FIMC_SD_PAD_SOURCE, | 930 | ret = media_create_pad_link(source, FIMC_SD_PAD_SOURCE, |
931 | sink, 0, flags); | 931 | sink, 0, flags); |
932 | if (ret) | 932 | if (ret) |
933 | break; | 933 | break; |
diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index e08183f9d0f7..6351f35b0a65 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c | |||
@@ -1865,7 +1865,7 @@ static int isp_link_entity( | |||
1865 | return -EINVAL; | 1865 | return -EINVAL; |
1866 | } | 1866 | } |
1867 | 1867 | ||
1868 | return media_entity_create_link(entity, i, input, pad, flags); | 1868 | return media_create_pad_link(entity, i, input, pad, flags); |
1869 | } | 1869 | } |
1870 | 1870 | ||
1871 | static int isp_register_entities(struct isp_device *isp) | 1871 | static int isp_register_entities(struct isp_device *isp) |
@@ -2004,51 +2004,51 @@ static int isp_initialize_modules(struct isp_device *isp) | |||
2004 | } | 2004 | } |
2005 | 2005 | ||
2006 | /* Connect the submodules. */ | 2006 | /* Connect the submodules. */ |
2007 | ret = media_entity_create_link( | 2007 | ret = media_create_pad_link( |
2008 | &isp->isp_csi2a.subdev.entity, CSI2_PAD_SOURCE, | 2008 | &isp->isp_csi2a.subdev.entity, CSI2_PAD_SOURCE, |
2009 | &isp->isp_ccdc.subdev.entity, CCDC_PAD_SINK, 0); | 2009 | &isp->isp_ccdc.subdev.entity, CCDC_PAD_SINK, 0); |
2010 | if (ret < 0) | 2010 | if (ret < 0) |
2011 | goto error_link; | 2011 | goto error_link; |
2012 | 2012 | ||
2013 | ret = media_entity_create_link( | 2013 | ret = media_create_pad_link( |
2014 | &isp->isp_ccp2.subdev.entity, CCP2_PAD_SOURCE, | 2014 | &isp->isp_ccp2.subdev.entity, CCP2_PAD_SOURCE, |
2015 | &isp->isp_ccdc.subdev.entity, CCDC_PAD_SINK, 0); | 2015 | &isp->isp_ccdc.subdev.entity, CCDC_PAD_SINK, 0); |
2016 | if (ret < 0) | 2016 | if (ret < 0) |
2017 | goto error_link; | 2017 | goto error_link; |
2018 | 2018 | ||
2019 | ret = media_entity_create_link( | 2019 | ret = media_create_pad_link( |
2020 | &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP, | 2020 | &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP, |
2021 | &isp->isp_prev.subdev.entity, PREV_PAD_SINK, 0); | 2021 | &isp->isp_prev.subdev.entity, PREV_PAD_SINK, 0); |
2022 | if (ret < 0) | 2022 | if (ret < 0) |
2023 | goto error_link; | 2023 | goto error_link; |
2024 | 2024 | ||
2025 | ret = media_entity_create_link( | 2025 | ret = media_create_pad_link( |
2026 | &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_OF, | 2026 | &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_OF, |
2027 | &isp->isp_res.subdev.entity, RESZ_PAD_SINK, 0); | 2027 | &isp->isp_res.subdev.entity, RESZ_PAD_SINK, 0); |
2028 | if (ret < 0) | 2028 | if (ret < 0) |
2029 | goto error_link; | 2029 | goto error_link; |
2030 | 2030 | ||
2031 | ret = media_entity_create_link( | 2031 | ret = media_create_pad_link( |
2032 | &isp->isp_prev.subdev.entity, PREV_PAD_SOURCE, | 2032 | &isp->isp_prev.subdev.entity, PREV_PAD_SOURCE, |
2033 | &isp->isp_res.subdev.entity, RESZ_PAD_SINK, 0); | 2033 | &isp->isp_res.subdev.entity, RESZ_PAD_SINK, 0); |
2034 | if (ret < 0) | 2034 | if (ret < 0) |
2035 | goto error_link; | 2035 | goto error_link; |
2036 | 2036 | ||
2037 | ret = media_entity_create_link( | 2037 | ret = media_create_pad_link( |
2038 | &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP, | 2038 | &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP, |
2039 | &isp->isp_aewb.subdev.entity, 0, | 2039 | &isp->isp_aewb.subdev.entity, 0, |
2040 | MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE); | 2040 | MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE); |
2041 | if (ret < 0) | 2041 | if (ret < 0) |
2042 | goto error_link; | 2042 | goto error_link; |
2043 | 2043 | ||
2044 | ret = media_entity_create_link( | 2044 | ret = media_create_pad_link( |
2045 | &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP, | 2045 | &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP, |
2046 | &isp->isp_af.subdev.entity, 0, | 2046 | &isp->isp_af.subdev.entity, 0, |
2047 | MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE); | 2047 | MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE); |
2048 | if (ret < 0) | 2048 | if (ret < 0) |
2049 | goto error_link; | 2049 | goto error_link; |
2050 | 2050 | ||
2051 | ret = media_entity_create_link( | 2051 | ret = media_create_pad_link( |
2052 | &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP, | 2052 | &isp->isp_ccdc.subdev.entity, CCDC_PAD_SOURCE_VP, |
2053 | &isp->isp_hist.subdev.entity, 0, | 2053 | &isp->isp_hist.subdev.entity, 0, |
2054 | MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE); | 2054 | MEDIA_LNK_FL_ENABLED | MEDIA_LNK_FL_IMMUTABLE); |
diff --git a/drivers/media/platform/omap3isp/ispccdc.c b/drivers/media/platform/omap3isp/ispccdc.c index d96e3be5e252..27555e4f4aa8 100644 --- a/drivers/media/platform/omap3isp/ispccdc.c +++ b/drivers/media/platform/omap3isp/ispccdc.c | |||
@@ -2667,7 +2667,7 @@ static int ccdc_init_entities(struct isp_ccdc_device *ccdc) | |||
2667 | goto error_video; | 2667 | goto error_video; |
2668 | 2668 | ||
2669 | /* Connect the CCDC subdev to the video node. */ | 2669 | /* Connect the CCDC subdev to the video node. */ |
2670 | ret = media_entity_create_link(&ccdc->subdev.entity, CCDC_PAD_SOURCE_OF, | 2670 | ret = media_create_pad_link(&ccdc->subdev.entity, CCDC_PAD_SOURCE_OF, |
2671 | &ccdc->video_out.video.entity, 0, 0); | 2671 | &ccdc->video_out.video.entity, 0, 0); |
2672 | if (ret < 0) | 2672 | if (ret < 0) |
2673 | goto error_link; | 2673 | goto error_link; |
diff --git a/drivers/media/platform/omap3isp/ispccp2.c b/drivers/media/platform/omap3isp/ispccp2.c index e1b5f5bea541..b215eb5049d6 100644 --- a/drivers/media/platform/omap3isp/ispccp2.c +++ b/drivers/media/platform/omap3isp/ispccp2.c | |||
@@ -1100,7 +1100,7 @@ static int ccp2_init_entities(struct isp_ccp2_device *ccp2) | |||
1100 | goto error_video; | 1100 | goto error_video; |
1101 | 1101 | ||
1102 | /* Connect the video node to the ccp2 subdev. */ | 1102 | /* Connect the video node to the ccp2 subdev. */ |
1103 | ret = media_entity_create_link(&ccp2->video_in.video.entity, 0, | 1103 | ret = media_create_pad_link(&ccp2->video_in.video.entity, 0, |
1104 | &ccp2->subdev.entity, CCP2_PAD_SINK, 0); | 1104 | &ccp2->subdev.entity, CCP2_PAD_SINK, 0); |
1105 | if (ret < 0) | 1105 | if (ret < 0) |
1106 | goto error_link; | 1106 | goto error_link; |
diff --git a/drivers/media/platform/omap3isp/ispcsi2.c b/drivers/media/platform/omap3isp/ispcsi2.c index 6fff92f0813a..fcefc1e74881 100644 --- a/drivers/media/platform/omap3isp/ispcsi2.c +++ b/drivers/media/platform/omap3isp/ispcsi2.c | |||
@@ -1265,7 +1265,7 @@ static int csi2_init_entities(struct isp_csi2_device *csi2) | |||
1265 | goto error_video; | 1265 | goto error_video; |
1266 | 1266 | ||
1267 | /* Connect the CSI2 subdev to the video node. */ | 1267 | /* Connect the CSI2 subdev to the video node. */ |
1268 | ret = media_entity_create_link(&csi2->subdev.entity, CSI2_PAD_SOURCE, | 1268 | ret = media_create_pad_link(&csi2->subdev.entity, CSI2_PAD_SOURCE, |
1269 | &csi2->video_out.video.entity, 0, 0); | 1269 | &csi2->video_out.video.entity, 0, 0); |
1270 | if (ret < 0) | 1270 | if (ret < 0) |
1271 | goto error_link; | 1271 | goto error_link; |
diff --git a/drivers/media/platform/omap3isp/isppreview.c b/drivers/media/platform/omap3isp/isppreview.c index b440c6342ca4..ad38d20c7770 100644 --- a/drivers/media/platform/omap3isp/isppreview.c +++ b/drivers/media/platform/omap3isp/isppreview.c | |||
@@ -2312,12 +2312,12 @@ static int preview_init_entities(struct isp_prev_device *prev) | |||
2312 | goto error_video_out; | 2312 | goto error_video_out; |
2313 | 2313 | ||
2314 | /* Connect the video nodes to the previewer subdev. */ | 2314 | /* Connect the video nodes to the previewer subdev. */ |
2315 | ret = media_entity_create_link(&prev->video_in.video.entity, 0, | 2315 | ret = media_create_pad_link(&prev->video_in.video.entity, 0, |
2316 | &prev->subdev.entity, PREV_PAD_SINK, 0); | 2316 | &prev->subdev.entity, PREV_PAD_SINK, 0); |
2317 | if (ret < 0) | 2317 | if (ret < 0) |
2318 | goto error_link; | 2318 | goto error_link; |
2319 | 2319 | ||
2320 | ret = media_entity_create_link(&prev->subdev.entity, PREV_PAD_SOURCE, | 2320 | ret = media_create_pad_link(&prev->subdev.entity, PREV_PAD_SOURCE, |
2321 | &prev->video_out.video.entity, 0, 0); | 2321 | &prev->video_out.video.entity, 0, 0); |
2322 | if (ret < 0) | 2322 | if (ret < 0) |
2323 | goto error_link; | 2323 | goto error_link; |
diff --git a/drivers/media/platform/omap3isp/ispresizer.c b/drivers/media/platform/omap3isp/ispresizer.c index 3deb1ec4a973..b48ad4d4b834 100644 --- a/drivers/media/platform/omap3isp/ispresizer.c +++ b/drivers/media/platform/omap3isp/ispresizer.c | |||
@@ -1756,12 +1756,12 @@ static int resizer_init_entities(struct isp_res_device *res) | |||
1756 | res->video_out.video.entity.flags |= MEDIA_ENT_FL_DEFAULT; | 1756 | res->video_out.video.entity.flags |= MEDIA_ENT_FL_DEFAULT; |
1757 | 1757 | ||
1758 | /* Connect the video nodes to the resizer subdev. */ | 1758 | /* Connect the video nodes to the resizer subdev. */ |
1759 | ret = media_entity_create_link(&res->video_in.video.entity, 0, | 1759 | ret = media_create_pad_link(&res->video_in.video.entity, 0, |
1760 | &res->subdev.entity, RESZ_PAD_SINK, 0); | 1760 | &res->subdev.entity, RESZ_PAD_SINK, 0); |
1761 | if (ret < 0) | 1761 | if (ret < 0) |
1762 | goto error_link; | 1762 | goto error_link; |
1763 | 1763 | ||
1764 | ret = media_entity_create_link(&res->subdev.entity, RESZ_PAD_SOURCE, | 1764 | ret = media_create_pad_link(&res->subdev.entity, RESZ_PAD_SOURCE, |
1765 | &res->video_out.video.entity, 0, 0); | 1765 | &res->video_out.video.entity, 0, 0); |
1766 | if (ret < 0) | 1766 | if (ret < 0) |
1767 | goto error_link; | 1767 | goto error_link; |
diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c index 1ba9bb08f5da..8649d4c0e90d 100644 --- a/drivers/media/platform/s3c-camif/camif-core.c +++ b/drivers/media/platform/s3c-camif/camif-core.c | |||
@@ -263,7 +263,7 @@ static int camif_create_media_links(struct camif_dev *camif) | |||
263 | { | 263 | { |
264 | int i, ret; | 264 | int i, ret; |
265 | 265 | ||
266 | ret = media_entity_create_link(&camif->sensor.sd->entity, 0, | 266 | ret = media_create_pad_link(&camif->sensor.sd->entity, 0, |
267 | &camif->subdev.entity, CAMIF_SD_PAD_SINK, | 267 | &camif->subdev.entity, CAMIF_SD_PAD_SINK, |
268 | MEDIA_LNK_FL_IMMUTABLE | | 268 | MEDIA_LNK_FL_IMMUTABLE | |
269 | MEDIA_LNK_FL_ENABLED); | 269 | MEDIA_LNK_FL_ENABLED); |
@@ -271,7 +271,7 @@ static int camif_create_media_links(struct camif_dev *camif) | |||
271 | return ret; | 271 | return ret; |
272 | 272 | ||
273 | for (i = 1; i < CAMIF_SD_PADS_NUM && !ret; i++) { | 273 | for (i = 1; i < CAMIF_SD_PADS_NUM && !ret; i++) { |
274 | ret = media_entity_create_link(&camif->subdev.entity, i, | 274 | ret = media_create_pad_link(&camif->subdev.entity, i, |
275 | &camif->vp[i - 1].vdev.entity, 0, | 275 | &camif->vp[i - 1].vdev.entity, 0, |
276 | MEDIA_LNK_FL_IMMUTABLE | | 276 | MEDIA_LNK_FL_IMMUTABLE | |
277 | MEDIA_LNK_FL_ENABLED); | 277 | MEDIA_LNK_FL_ENABLED); |
diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c index 4e61886384e3..9cd94a76a9ed 100644 --- a/drivers/media/platform/vsp1/vsp1_drv.c +++ b/drivers/media/platform/vsp1/vsp1_drv.c | |||
@@ -101,7 +101,7 @@ static int vsp1_create_links(struct vsp1_device *vsp1, struct vsp1_entity *sink) | |||
101 | if (!(entity->pads[pad].flags & MEDIA_PAD_FL_SINK)) | 101 | if (!(entity->pads[pad].flags & MEDIA_PAD_FL_SINK)) |
102 | continue; | 102 | continue; |
103 | 103 | ||
104 | ret = media_entity_create_link(&source->subdev.entity, | 104 | ret = media_create_pad_link(&source->subdev.entity, |
105 | source->source_pad, | 105 | source->source_pad, |
106 | entity, pad, flags); | 106 | entity, pad, flags); |
107 | if (ret < 0) | 107 | if (ret < 0) |
@@ -262,7 +262,7 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) | |||
262 | } | 262 | } |
263 | 263 | ||
264 | if (vsp1->pdata.features & VSP1_HAS_LIF) { | 264 | if (vsp1->pdata.features & VSP1_HAS_LIF) { |
265 | ret = media_entity_create_link( | 265 | ret = media_create_pad_link( |
266 | &vsp1->wpf[0]->entity.subdev.entity, RWPF_PAD_SOURCE, | 266 | &vsp1->wpf[0]->entity.subdev.entity, RWPF_PAD_SOURCE, |
267 | &vsp1->lif->entity.subdev.entity, LIF_PAD_SINK, 0); | 267 | &vsp1->lif->entity.subdev.entity, LIF_PAD_SINK, 0); |
268 | if (ret < 0) | 268 | if (ret < 0) |
diff --git a/drivers/media/platform/vsp1/vsp1_rpf.c b/drivers/media/platform/vsp1/vsp1_rpf.c index cd5248a9a271..1bd51d22ff04 100644 --- a/drivers/media/platform/vsp1/vsp1_rpf.c +++ b/drivers/media/platform/vsp1/vsp1_rpf.c | |||
@@ -278,7 +278,7 @@ struct vsp1_rwpf *vsp1_rpf_create(struct vsp1_device *vsp1, unsigned int index) | |||
278 | rpf->entity.video = video; | 278 | rpf->entity.video = video; |
279 | 279 | ||
280 | /* Connect the video device to the RPF. */ | 280 | /* Connect the video device to the RPF. */ |
281 | ret = media_entity_create_link(&rpf->video.video.entity, 0, | 281 | ret = media_create_pad_link(&rpf->video.video.entity, 0, |
282 | &rpf->entity.subdev.entity, | 282 | &rpf->entity.subdev.entity, |
283 | RWPF_PAD_SINK, | 283 | RWPF_PAD_SINK, |
284 | MEDIA_LNK_FL_ENABLED | | 284 | MEDIA_LNK_FL_ENABLED | |
diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c index 95b62f4f77e7..ca19c534dac6 100644 --- a/drivers/media/platform/vsp1/vsp1_wpf.c +++ b/drivers/media/platform/vsp1/vsp1_wpf.c | |||
@@ -284,7 +284,7 @@ struct vsp1_rwpf *vsp1_wpf_create(struct vsp1_device *vsp1, unsigned int index) | |||
284 | if (!(vsp1->pdata.features & VSP1_HAS_LIF) || index != 0) | 284 | if (!(vsp1->pdata.features & VSP1_HAS_LIF) || index != 0) |
285 | flags |= MEDIA_LNK_FL_IMMUTABLE; | 285 | flags |= MEDIA_LNK_FL_IMMUTABLE; |
286 | 286 | ||
287 | ret = media_entity_create_link(&wpf->entity.subdev.entity, | 287 | ret = media_create_pad_link(&wpf->entity.subdev.entity, |
288 | RWPF_PAD_SOURCE, | 288 | RWPF_PAD_SOURCE, |
289 | &wpf->video.video.entity, 0, flags); | 289 | &wpf->video.video.entity, 0, flags); |
290 | if (ret < 0) | 290 | if (ret < 0) |
diff --git a/drivers/media/platform/xilinx/xilinx-vipp.c b/drivers/media/platform/xilinx/xilinx-vipp.c index b9bf24fefa5a..2352f7e5a6a3 100644 --- a/drivers/media/platform/xilinx/xilinx-vipp.c +++ b/drivers/media/platform/xilinx/xilinx-vipp.c | |||
@@ -156,7 +156,7 @@ static int xvip_graph_build_one(struct xvip_composite_device *xdev, | |||
156 | local->name, local_pad->index, | 156 | local->name, local_pad->index, |
157 | remote->name, remote_pad->index); | 157 | remote->name, remote_pad->index); |
158 | 158 | ||
159 | ret = media_entity_create_link(local, local_pad->index, | 159 | ret = media_create_pad_link(local, local_pad->index, |
160 | remote, remote_pad->index, | 160 | remote, remote_pad->index, |
161 | link_flags); | 161 | link_flags); |
162 | if (ret < 0) { | 162 | if (ret < 0) { |
@@ -270,7 +270,7 @@ static int xvip_graph_build_dma(struct xvip_composite_device *xdev) | |||
270 | source->name, source_pad->index, | 270 | source->name, source_pad->index, |
271 | sink->name, sink_pad->index); | 271 | sink->name, sink_pad->index); |
272 | 272 | ||
273 | ret = media_entity_create_link(source, source_pad->index, | 273 | ret = media_create_pad_link(source, source_pad->index, |
274 | sink, sink_pad->index, | 274 | sink, sink_pad->index, |
275 | link_flags); | 275 | link_flags); |
276 | if (ret < 0) { | 276 | if (ret < 0) { |
diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c index 0378a2c99ebb..a55eb524ea21 100644 --- a/drivers/media/usb/au0828/au0828-core.c +++ b/drivers/media/usb/au0828/au0828-core.c | |||
@@ -260,13 +260,13 @@ static void au0828_create_media_graph(struct au0828_dev *dev) | |||
260 | return; | 260 | return; |
261 | 261 | ||
262 | if (tuner) | 262 | if (tuner) |
263 | media_entity_create_link(tuner, 0, decoder, 0, | 263 | media_create_pad_link(tuner, 0, decoder, 0, |
264 | MEDIA_LNK_FL_ENABLED); | 264 | MEDIA_LNK_FL_ENABLED); |
265 | if (dev->vdev.entity.links) | 265 | if (dev->vdev.entity.links) |
266 | media_entity_create_link(decoder, 1, &dev->vdev.entity, 0, | 266 | media_create_pad_link(decoder, 1, &dev->vdev.entity, 0, |
267 | MEDIA_LNK_FL_ENABLED); | 267 | MEDIA_LNK_FL_ENABLED); |
268 | if (dev->vbi_dev.entity.links) | 268 | if (dev->vbi_dev.entity.links) |
269 | media_entity_create_link(decoder, 2, &dev->vbi_dev.entity, 0, | 269 | media_create_pad_link(decoder, 2, &dev->vbi_dev.entity, 0, |
270 | MEDIA_LNK_FL_ENABLED); | 270 | MEDIA_LNK_FL_ENABLED); |
271 | #endif | 271 | #endif |
272 | } | 272 | } |
diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c index 89dc695c696e..695f0c092c79 100644 --- a/drivers/media/usb/cx231xx/cx231xx-cards.c +++ b/drivers/media/usb/cx231xx/cx231xx-cards.c | |||
@@ -1264,11 +1264,11 @@ static void cx231xx_create_media_graph(struct cx231xx *dev) | |||
1264 | return; | 1264 | return; |
1265 | 1265 | ||
1266 | if (tuner) | 1266 | if (tuner) |
1267 | media_entity_create_link(tuner, 0, decoder, 0, | 1267 | media_create_pad_link(tuner, 0, decoder, 0, |
1268 | MEDIA_LNK_FL_ENABLED); | 1268 | MEDIA_LNK_FL_ENABLED); |
1269 | media_entity_create_link(decoder, 1, &dev->vdev.entity, 0, | 1269 | media_create_pad_link(decoder, 1, &dev->vdev.entity, 0, |
1270 | MEDIA_LNK_FL_ENABLED); | 1270 | MEDIA_LNK_FL_ENABLED); |
1271 | media_entity_create_link(decoder, 2, &dev->vbi_dev.entity, 0, | 1271 | media_create_pad_link(decoder, 2, &dev->vbi_dev.entity, 0, |
1272 | MEDIA_LNK_FL_ENABLED); | 1272 | MEDIA_LNK_FL_ENABLED); |
1273 | #endif | 1273 | #endif |
1274 | } | 1274 | } |
diff --git a/drivers/media/usb/uvc/uvc_entity.c b/drivers/media/usb/uvc/uvc_entity.c index 245445491516..429e428ccd93 100644 --- a/drivers/media/usb/uvc/uvc_entity.c +++ b/drivers/media/usb/uvc/uvc_entity.c | |||
@@ -56,7 +56,7 @@ static int uvc_mc_register_entity(struct uvc_video_chain *chain, | |||
56 | continue; | 56 | continue; |
57 | 57 | ||
58 | remote_pad = remote->num_pads - 1; | 58 | remote_pad = remote->num_pads - 1; |
59 | ret = media_entity_create_link(source, remote_pad, | 59 | ret = media_create_pad_link(source, remote_pad, |
60 | sink, i, flags); | 60 | sink, i, flags); |
61 | if (ret < 0) | 61 | if (ret < 0) |
62 | return ret; | 62 | return ret; |
diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c index 8fb676186898..d96bdaaae50e 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | |||
@@ -971,7 +971,7 @@ vpfe_ipipeif_register_entities(struct vpfe_ipipeif_device *ipipeif, | |||
971 | ipipeif->video_in.vpfe_dev = vpfe_dev; | 971 | ipipeif->video_in.vpfe_dev = vpfe_dev; |
972 | 972 | ||
973 | flags = 0; | 973 | flags = 0; |
974 | ret = media_entity_create_link(&ipipeif->video_in.video_dev.entity, 0, | 974 | ret = media_create_pad_link(&ipipeif->video_in.video_dev.entity, 0, |
975 | &ipipeif->subdev.entity, 0, flags); | 975 | &ipipeif->subdev.entity, 0, flags); |
976 | if (ret < 0) | 976 | if (ret < 0) |
977 | goto fail; | 977 | goto fail; |
diff --git a/drivers/staging/media/davinci_vpfe/dm365_isif.c b/drivers/staging/media/davinci_vpfe/dm365_isif.c index b1f01adfa7c8..df77288b0ec0 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_isif.c +++ b/drivers/staging/media/davinci_vpfe/dm365_isif.c | |||
@@ -1817,7 +1817,7 @@ int vpfe_isif_register_entities(struct vpfe_isif_device *isif, | |||
1817 | isif->video_out.vpfe_dev = vpfe_dev; | 1817 | isif->video_out.vpfe_dev = vpfe_dev; |
1818 | flags = 0; | 1818 | flags = 0; |
1819 | /* connect isif to video node */ | 1819 | /* connect isif to video node */ |
1820 | ret = media_entity_create_link(&isif->subdev.entity, 1, | 1820 | ret = media_create_pad_link(&isif->subdev.entity, 1, |
1821 | &isif->video_out.video_dev.entity, | 1821 | &isif->video_out.video_dev.entity, |
1822 | 0, flags); | 1822 | 0, flags); |
1823 | if (ret < 0) | 1823 | if (ret < 0) |
diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.c b/drivers/staging/media/davinci_vpfe/dm365_resizer.c index 7275cf3d6c20..50c8725c5aa6 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_resizer.c +++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.c | |||
@@ -1826,27 +1826,27 @@ int vpfe_resizer_register_entities(struct vpfe_resizer_device *resizer, | |||
1826 | resizer->resizer_b.video_out.vpfe_dev = vpfe_dev; | 1826 | resizer->resizer_b.video_out.vpfe_dev = vpfe_dev; |
1827 | 1827 | ||
1828 | /* create link between Resizer Crop----> Resizer A*/ | 1828 | /* create link between Resizer Crop----> Resizer A*/ |
1829 | ret = media_entity_create_link(&resizer->crop_resizer.subdev.entity, 1, | 1829 | ret = media_create_pad_link(&resizer->crop_resizer.subdev.entity, 1, |
1830 | &resizer->resizer_a.subdev.entity, | 1830 | &resizer->resizer_a.subdev.entity, |
1831 | 0, flags); | 1831 | 0, flags); |
1832 | if (ret < 0) | 1832 | if (ret < 0) |
1833 | goto out_create_link; | 1833 | goto out_create_link; |
1834 | 1834 | ||
1835 | /* create link between Resizer Crop----> Resizer B*/ | 1835 | /* create link between Resizer Crop----> Resizer B*/ |
1836 | ret = media_entity_create_link(&resizer->crop_resizer.subdev.entity, 2, | 1836 | ret = media_create_pad_link(&resizer->crop_resizer.subdev.entity, 2, |
1837 | &resizer->resizer_b.subdev.entity, | 1837 | &resizer->resizer_b.subdev.entity, |
1838 | 0, flags); | 1838 | 0, flags); |
1839 | if (ret < 0) | 1839 | if (ret < 0) |
1840 | goto out_create_link; | 1840 | goto out_create_link; |
1841 | 1841 | ||
1842 | /* create link between Resizer A ----> video out */ | 1842 | /* create link between Resizer A ----> video out */ |
1843 | ret = media_entity_create_link(&resizer->resizer_a.subdev.entity, 1, | 1843 | ret = media_create_pad_link(&resizer->resizer_a.subdev.entity, 1, |
1844 | &resizer->resizer_a.video_out.video_dev.entity, 0, flags); | 1844 | &resizer->resizer_a.video_out.video_dev.entity, 0, flags); |
1845 | if (ret < 0) | 1845 | if (ret < 0) |
1846 | goto out_create_link; | 1846 | goto out_create_link; |
1847 | 1847 | ||
1848 | /* create link between Resizer B ----> video out */ | 1848 | /* create link between Resizer B ----> video out */ |
1849 | ret = media_entity_create_link(&resizer->resizer_b.subdev.entity, 1, | 1849 | ret = media_create_pad_link(&resizer->resizer_b.subdev.entity, 1, |
1850 | &resizer->resizer_b.video_out.video_dev.entity, 0, flags); | 1850 | &resizer->resizer_b.video_out.video_dev.entity, 0, flags); |
1851 | if (ret < 0) | 1851 | if (ret < 0) |
1852 | goto out_create_link; | 1852 | goto out_create_link; |
diff --git a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c index 69b678ca40c0..ec46f366dd17 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c | |||
@@ -445,32 +445,32 @@ static int vpfe_register_entities(struct vpfe_device *vpfe_dev) | |||
445 | /* if entity has no pads (ex: amplifier), | 445 | /* if entity has no pads (ex: amplifier), |
446 | cant establish link */ | 446 | cant establish link */ |
447 | if (vpfe_dev->sd[i]->entity.num_pads) { | 447 | if (vpfe_dev->sd[i]->entity.num_pads) { |
448 | ret = media_entity_create_link(&vpfe_dev->sd[i]->entity, | 448 | ret = media_create_pad_link(&vpfe_dev->sd[i]->entity, |
449 | 0, &vpfe_dev->vpfe_isif.subdev.entity, | 449 | 0, &vpfe_dev->vpfe_isif.subdev.entity, |
450 | 0, flags); | 450 | 0, flags); |
451 | if (ret < 0) | 451 | if (ret < 0) |
452 | goto out_resizer_register; | 452 | goto out_resizer_register; |
453 | } | 453 | } |
454 | 454 | ||
455 | ret = media_entity_create_link(&vpfe_dev->vpfe_isif.subdev.entity, 1, | 455 | ret = media_create_pad_link(&vpfe_dev->vpfe_isif.subdev.entity, 1, |
456 | &vpfe_dev->vpfe_ipipeif.subdev.entity, | 456 | &vpfe_dev->vpfe_ipipeif.subdev.entity, |
457 | 0, flags); | 457 | 0, flags); |
458 | if (ret < 0) | 458 | if (ret < 0) |
459 | goto out_resizer_register; | 459 | goto out_resizer_register; |
460 | 460 | ||
461 | ret = media_entity_create_link(&vpfe_dev->vpfe_ipipeif.subdev.entity, 1, | 461 | ret = media_create_pad_link(&vpfe_dev->vpfe_ipipeif.subdev.entity, 1, |
462 | &vpfe_dev->vpfe_ipipe.subdev.entity, | 462 | &vpfe_dev->vpfe_ipipe.subdev.entity, |
463 | 0, flags); | 463 | 0, flags); |
464 | if (ret < 0) | 464 | if (ret < 0) |
465 | goto out_resizer_register; | 465 | goto out_resizer_register; |
466 | 466 | ||
467 | ret = media_entity_create_link(&vpfe_dev->vpfe_ipipe.subdev.entity, | 467 | ret = media_create_pad_link(&vpfe_dev->vpfe_ipipe.subdev.entity, |
468 | 1, &vpfe_dev->vpfe_resizer.crop_resizer.subdev.entity, | 468 | 1, &vpfe_dev->vpfe_resizer.crop_resizer.subdev.entity, |
469 | 0, flags); | 469 | 0, flags); |
470 | if (ret < 0) | 470 | if (ret < 0) |
471 | goto out_resizer_register; | 471 | goto out_resizer_register; |
472 | 472 | ||
473 | ret = media_entity_create_link(&vpfe_dev->vpfe_ipipeif.subdev.entity, 1, | 473 | ret = media_create_pad_link(&vpfe_dev->vpfe_ipipeif.subdev.entity, 1, |
474 | &vpfe_dev->vpfe_resizer.crop_resizer.subdev.entity, | 474 | &vpfe_dev->vpfe_resizer.crop_resizer.subdev.entity, |
475 | 0, flags); | 475 | 0, flags); |
476 | if (ret < 0) | 476 | if (ret < 0) |
diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c index 5fc3675b190f..60e67fadcac1 100644 --- a/drivers/staging/media/omap4iss/iss.c +++ b/drivers/staging/media/omap4iss/iss.c | |||
@@ -1259,7 +1259,7 @@ static int iss_register_entities(struct iss_device *iss) | |||
1259 | goto done; | 1259 | goto done; |
1260 | } | 1260 | } |
1261 | 1261 | ||
1262 | ret = media_entity_create_link(&sensor->entity, 0, input, pad, | 1262 | ret = media_create_pad_link(&sensor->entity, 0, input, pad, |
1263 | flags); | 1263 | flags); |
1264 | if (ret < 0) | 1264 | if (ret < 0) |
1265 | goto done; | 1265 | goto done; |
@@ -1317,31 +1317,31 @@ static int iss_initialize_modules(struct iss_device *iss) | |||
1317 | } | 1317 | } |
1318 | 1318 | ||
1319 | /* Connect the submodules. */ | 1319 | /* Connect the submodules. */ |
1320 | ret = media_entity_create_link( | 1320 | ret = media_create_pad_link( |
1321 | &iss->csi2a.subdev.entity, CSI2_PAD_SOURCE, | 1321 | &iss->csi2a.subdev.entity, CSI2_PAD_SOURCE, |
1322 | &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SINK, 0); | 1322 | &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SINK, 0); |
1323 | if (ret < 0) | 1323 | if (ret < 0) |
1324 | goto error_link; | 1324 | goto error_link; |
1325 | 1325 | ||
1326 | ret = media_entity_create_link( | 1326 | ret = media_create_pad_link( |
1327 | &iss->csi2b.subdev.entity, CSI2_PAD_SOURCE, | 1327 | &iss->csi2b.subdev.entity, CSI2_PAD_SOURCE, |
1328 | &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SINK, 0); | 1328 | &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SINK, 0); |
1329 | if (ret < 0) | 1329 | if (ret < 0) |
1330 | goto error_link; | 1330 | goto error_link; |
1331 | 1331 | ||
1332 | ret = media_entity_create_link( | 1332 | ret = media_create_pad_link( |
1333 | &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SOURCE_VP, | 1333 | &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SOURCE_VP, |
1334 | &iss->resizer.subdev.entity, RESIZER_PAD_SINK, 0); | 1334 | &iss->resizer.subdev.entity, RESIZER_PAD_SINK, 0); |
1335 | if (ret < 0) | 1335 | if (ret < 0) |
1336 | goto error_link; | 1336 | goto error_link; |
1337 | 1337 | ||
1338 | ret = media_entity_create_link( | 1338 | ret = media_create_pad_link( |
1339 | &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SOURCE_VP, | 1339 | &iss->ipipeif.subdev.entity, IPIPEIF_PAD_SOURCE_VP, |
1340 | &iss->ipipe.subdev.entity, IPIPE_PAD_SINK, 0); | 1340 | &iss->ipipe.subdev.entity, IPIPE_PAD_SINK, 0); |
1341 | if (ret < 0) | 1341 | if (ret < 0) |
1342 | goto error_link; | 1342 | goto error_link; |
1343 | 1343 | ||
1344 | ret = media_entity_create_link( | 1344 | ret = media_create_pad_link( |
1345 | &iss->ipipe.subdev.entity, IPIPE_PAD_SOURCE_VP, | 1345 | &iss->ipipe.subdev.entity, IPIPE_PAD_SOURCE_VP, |
1346 | &iss->resizer.subdev.entity, RESIZER_PAD_SINK, 0); | 1346 | &iss->resizer.subdev.entity, RESIZER_PAD_SINK, 0); |
1347 | if (ret < 0) | 1347 | if (ret < 0) |
diff --git a/drivers/staging/media/omap4iss/iss_csi2.c b/drivers/staging/media/omap4iss/iss_csi2.c index 86111e39a728..c6eb5a7a593f 100644 --- a/drivers/staging/media/omap4iss/iss_csi2.c +++ b/drivers/staging/media/omap4iss/iss_csi2.c | |||
@@ -1291,7 +1291,7 @@ static int csi2_init_entities(struct iss_csi2_device *csi2, const char *subname) | |||
1291 | goto error_video; | 1291 | goto error_video; |
1292 | 1292 | ||
1293 | /* Connect the CSI2 subdev to the video node. */ | 1293 | /* Connect the CSI2 subdev to the video node. */ |
1294 | ret = media_entity_create_link(&csi2->subdev.entity, CSI2_PAD_SOURCE, | 1294 | ret = media_create_pad_link(&csi2->subdev.entity, CSI2_PAD_SOURCE, |
1295 | &csi2->video_out.video.entity, 0, 0); | 1295 | &csi2->video_out.video.entity, 0, 0); |
1296 | if (ret < 0) | 1296 | if (ret < 0) |
1297 | goto error_link; | 1297 | goto error_link; |
diff --git a/drivers/staging/media/omap4iss/iss_ipipeif.c b/drivers/staging/media/omap4iss/iss_ipipeif.c index d031a5f22cdc..b0c5f2431b62 100644 --- a/drivers/staging/media/omap4iss/iss_ipipeif.c +++ b/drivers/staging/media/omap4iss/iss_ipipeif.c | |||
@@ -762,7 +762,7 @@ static int ipipeif_init_entities(struct iss_ipipeif_device *ipipeif) | |||
762 | return ret; | 762 | return ret; |
763 | 763 | ||
764 | /* Connect the IPIPEIF subdev to the video node. */ | 764 | /* Connect the IPIPEIF subdev to the video node. */ |
765 | ret = media_entity_create_link(&ipipeif->subdev.entity, | 765 | ret = media_create_pad_link(&ipipeif->subdev.entity, |
766 | IPIPEIF_PAD_SOURCE_ISIF_SF, | 766 | IPIPEIF_PAD_SOURCE_ISIF_SF, |
767 | &ipipeif->video_out.video.entity, 0, 0); | 767 | &ipipeif->video_out.video.entity, 0, 0); |
768 | if (ret < 0) | 768 | if (ret < 0) |
diff --git a/drivers/staging/media/omap4iss/iss_resizer.c b/drivers/staging/media/omap4iss/iss_resizer.c index 11031d9de3ab..a2cb57cb460d 100644 --- a/drivers/staging/media/omap4iss/iss_resizer.c +++ b/drivers/staging/media/omap4iss/iss_resizer.c | |||
@@ -804,7 +804,7 @@ static int resizer_init_entities(struct iss_resizer_device *resizer) | |||
804 | return ret; | 804 | return ret; |
805 | 805 | ||
806 | /* Connect the RESIZER subdev to the video node. */ | 806 | /* Connect the RESIZER subdev to the video node. */ |
807 | ret = media_entity_create_link(&resizer->subdev.entity, | 807 | ret = media_create_pad_link(&resizer->subdev.entity, |
808 | RESIZER_PAD_SOURCE_MEM, | 808 | RESIZER_PAD_SOURCE_MEM, |
809 | &resizer->video_out.video.entity, 0, 0); | 809 | &resizer->video_out.video.entity, 0, 0); |
810 | if (ret < 0) | 810 | if (ret < 0) |
diff --git a/include/media/media-entity.h b/include/media/media-entity.h index 96a5d3e6f6f4..ad9e16e5e44d 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h | |||
@@ -215,7 +215,7 @@ int media_entity_init(struct media_entity *entity, u16 num_pads, | |||
215 | struct media_pad *pads); | 215 | struct media_pad *pads); |
216 | void media_entity_cleanup(struct media_entity *entity); | 216 | void media_entity_cleanup(struct media_entity *entity); |
217 | 217 | ||
218 | int media_entity_create_link(struct media_entity *source, u16 source_pad, | 218 | int media_create_pad_link(struct media_entity *source, u16 source_pad, |
219 | struct media_entity *sink, u16 sink_pad, u32 flags); | 219 | struct media_entity *sink, u16 sink_pad, u32 flags); |
220 | void __media_entity_remove_links(struct media_entity *entity); | 220 | void __media_entity_remove_links(struct media_entity *entity); |
221 | void media_entity_remove_links(struct media_entity *entity); | 221 | void media_entity_remove_links(struct media_entity *entity); |