diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-12-11 07:44:40 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 12:19:03 -0200 |
commit | ab22e77cd3d3073c8cac51b59713ef635678dfbe (patch) | |
tree | dfe14b163cd094531b260cab7e7d69d035b751da /drivers/staging/media | |
parent | b83e250833e6c40a9e92935ea6fc125b64792357 (diff) | |
download | linux-ab22e77cd3d3073c8cac51b59713ef635678dfbe.tar.bz2 |
[media] media framework: rename pads init function to media_entity_pads_init()
With the MC next gen rework, what's left for media_entity_init()
is to just initialize the PADs. However, certain devices, like
a FLASH led/light doesn't have any input or output PAD.
So, there's no reason why calling media_entity_init() would be
mandatory. Also, despite its name, what this function actually
does is to initialize the PADs data. So, rename it to
media_entity_pads_init() in order to reflect that.
The media entity actual init happens during entity register,
at media_device_register_entity(). We should move init of
num_links and num_backlinks to it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_isif.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_resizer.c | 6 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/vpfe_video.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/omap4iss/iss_csi2.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/omap4iss/iss_ipipe.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/omap4iss/iss_ipipeif.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/omap4iss/iss_resizer.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/omap4iss/iss_video.c | 2 |
10 files changed, 12 insertions, 12 deletions
diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c index 77837afab0ce..ac78ed2f8bcc 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c @@ -1843,7 +1843,7 @@ vpfe_ipipe_init(struct vpfe_ipipe_device *ipipe, struct platform_device *pdev) v4l2_ctrl_handler_setup(&ipipe->ctrls); sd->ctrl_handler = &ipipe->ctrls; - return media_entity_init(me, IPIPE_PADS_NUM, pads); + return media_entity_pads_init(me, IPIPE_PADS_NUM, pads); } /* diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c index b66584ecb693..a54c60fce3d5 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c @@ -1031,7 +1031,7 @@ int vpfe_ipipeif_init(struct vpfe_ipipeif_device *ipipeif, ipipeif->output = IPIPEIF_OUTPUT_NONE; me->ops = &ipipeif_media_ops; - ret = media_entity_init(me, IPIPEIF_NUM_PADS, pads); + ret = media_entity_pads_init(me, IPIPEIF_NUM_PADS, pads); if (ret) goto fail; diff --git a/drivers/staging/media/davinci_vpfe/dm365_isif.c b/drivers/staging/media/davinci_vpfe/dm365_isif.c index 8ca0c1297ec8..b35667afb73f 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_isif.c +++ b/drivers/staging/media/davinci_vpfe/dm365_isif.c @@ -2057,7 +2057,7 @@ int vpfe_isif_init(struct vpfe_isif_device *isif, struct platform_device *pdev) isif->input = ISIF_INPUT_NONE; isif->output = ISIF_OUTPUT_NONE; me->ops = &isif_media_ops; - status = media_entity_init(me, ISIF_PADS_NUM, pads); + status = media_entity_pads_init(me, ISIF_PADS_NUM, pads); if (status) goto isif_fail; isif->video_out.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.c b/drivers/staging/media/davinci_vpfe/dm365_resizer.c index ba887efd226a..669ae3f9791f 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_resizer.c +++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.c @@ -1915,7 +1915,7 @@ int vpfe_resizer_init(struct vpfe_resizer_device *vpfe_rsz, vpfe_rsz->crop_resizer.output2 = RESIZER_CROP_OUTPUT_NONE; vpfe_rsz->crop_resizer.rsz_device = vpfe_rsz; me->ops = &resizer_media_ops; - ret = media_entity_init(me, RESIZER_CROP_PADS_NUM, pads); + ret = media_entity_pads_init(me, RESIZER_CROP_PADS_NUM, pads); if (ret) return ret; @@ -1937,7 +1937,7 @@ int vpfe_resizer_init(struct vpfe_resizer_device *vpfe_rsz, vpfe_rsz->resizer_a.output = RESIZER_OUTPUT_NONE; vpfe_rsz->resizer_a.rsz_device = vpfe_rsz; me->ops = &resizer_media_ops; - ret = media_entity_init(me, RESIZER_PADS_NUM, pads); + ret = media_entity_pads_init(me, RESIZER_PADS_NUM, pads); if (ret) return ret; @@ -1959,7 +1959,7 @@ int vpfe_resizer_init(struct vpfe_resizer_device *vpfe_rsz, vpfe_rsz->resizer_b.output = RESIZER_OUTPUT_NONE; vpfe_rsz->resizer_b.rsz_device = vpfe_rsz; me->ops = &resizer_media_ops; - ret = media_entity_init(me, RESIZER_PADS_NUM, pads); + ret = media_entity_pads_init(me, RESIZER_PADS_NUM, pads); if (ret) return ret; diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c index a5e30413fc47..285dc1a69b2c 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c @@ -1599,7 +1599,7 @@ int vpfe_video_init(struct vpfe_video_device *video, const char *name) spin_lock_init(&video->irqlock); spin_lock_init(&video->dma_queue_lock); mutex_init(&video->lock); - ret = media_entity_init(&video->video_dev.entity, + ret = media_entity_pads_init(&video->video_dev.entity, 1, &video->pad); if (ret < 0) return ret; diff --git a/drivers/staging/media/omap4iss/iss_csi2.c b/drivers/staging/media/omap4iss/iss_csi2.c index 2b9a36cd8fa8..226366a03661 100644 --- a/drivers/staging/media/omap4iss/iss_csi2.c +++ b/drivers/staging/media/omap4iss/iss_csi2.c @@ -1276,7 +1276,7 @@ static int csi2_init_entities(struct iss_csi2_device *csi2, const char *subname) pads[CSI2_PAD_SINK].flags = MEDIA_PAD_FL_SINK; me->ops = &csi2_media_ops; - ret = media_entity_init(me, CSI2_PADS_NUM, pads); + ret = media_entity_pads_init(me, CSI2_PADS_NUM, pads); if (ret < 0) return ret; diff --git a/drivers/staging/media/omap4iss/iss_ipipe.c b/drivers/staging/media/omap4iss/iss_ipipe.c index dd9d7d54e6f8..d38782e8e84c 100644 --- a/drivers/staging/media/omap4iss/iss_ipipe.c +++ b/drivers/staging/media/omap4iss/iss_ipipe.c @@ -516,7 +516,7 @@ static int ipipe_init_entities(struct iss_ipipe_device *ipipe) pads[IPIPE_PAD_SOURCE_VP].flags = MEDIA_PAD_FL_SOURCE; me->ops = &ipipe_media_ops; - ret = media_entity_init(me, IPIPE_PADS_NUM, pads); + ret = media_entity_pads_init(me, IPIPE_PADS_NUM, pads); if (ret < 0) return ret; diff --git a/drivers/staging/media/omap4iss/iss_ipipeif.c b/drivers/staging/media/omap4iss/iss_ipipeif.c index 8cbb9840a989..c2b5638a0898 100644 --- a/drivers/staging/media/omap4iss/iss_ipipeif.c +++ b/drivers/staging/media/omap4iss/iss_ipipeif.c @@ -748,7 +748,7 @@ static int ipipeif_init_entities(struct iss_ipipeif_device *ipipeif) pads[IPIPEIF_PAD_SOURCE_VP].flags = MEDIA_PAD_FL_SOURCE; me->ops = &ipipeif_media_ops; - ret = media_entity_init(me, IPIPEIF_PADS_NUM, pads); + ret = media_entity_pads_init(me, IPIPEIF_PADS_NUM, pads); if (ret < 0) return ret; diff --git a/drivers/staging/media/omap4iss/iss_resizer.c b/drivers/staging/media/omap4iss/iss_resizer.c index a3925ecd0ed7..fea13ab4041f 100644 --- a/drivers/staging/media/omap4iss/iss_resizer.c +++ b/drivers/staging/media/omap4iss/iss_resizer.c @@ -790,7 +790,7 @@ static int resizer_init_entities(struct iss_resizer_device *resizer) pads[RESIZER_PAD_SOURCE_MEM].flags = MEDIA_PAD_FL_SOURCE; me->ops = &resizer_media_ops; - ret = media_entity_init(me, RESIZER_PADS_NUM, pads); + ret = media_entity_pads_init(me, RESIZER_PADS_NUM, pads); if (ret < 0) return ret; diff --git a/drivers/staging/media/omap4iss/iss_video.c b/drivers/staging/media/omap4iss/iss_video.c index 60b7a58e6122..8c6af412bc16 100644 --- a/drivers/staging/media/omap4iss/iss_video.c +++ b/drivers/staging/media/omap4iss/iss_video.c @@ -1101,7 +1101,7 @@ int omap4iss_video_init(struct iss_video *video, const char *name) return -EINVAL; } - ret = media_entity_init(&video->video.entity, 1, &video->pad); + ret = media_entity_pads_init(&video->video.entity, 1, &video->pad); if (ret < 0) return ret; |