]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
[media] media: get rid of unused "extra_links" param on media_entity_init()
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 6 Aug 2015 12:25:57 +0000 (09:25 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 11 Jan 2016 14:18:39 +0000 (12:18 -0200)
Currently, media_entity_init() creates an array with the links,
allocated at init time. It provides a parameter (extra_links)
that would allocate more links than the current needs, but this
is not used by any driver.

As we want to be able to do dynamic link allocation/removal,
we'll need to change the implementation of the links. So,
before doing that, let's first remove that extra unused
parameter, in order to cleanup the interface first.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
67 files changed:
Documentation/media-framework.txt
Documentation/video4linux/v4l2-framework.txt
Documentation/zh_CN/video4linux/v4l2-framework.txt
drivers/media/dvb-core/dvbdev.c
drivers/media/dvb-frontends/au8522_decoder.c
drivers/media/i2c/ad9389b.c
drivers/media/i2c/adp1653.c
drivers/media/i2c/adv7180.c
drivers/media/i2c/adv7511.c
drivers/media/i2c/adv7604.c
drivers/media/i2c/adv7842.c
drivers/media/i2c/as3645a.c
drivers/media/i2c/cx25840/cx25840-core.c
drivers/media/i2c/lm3560.c
drivers/media/i2c/lm3646.c
drivers/media/i2c/m5mols/m5mols_core.c
drivers/media/i2c/mt9m032.c
drivers/media/i2c/mt9p031.c
drivers/media/i2c/mt9t001.c
drivers/media/i2c/mt9v032.c
drivers/media/i2c/noon010pc30.c
drivers/media/i2c/ov2659.c
drivers/media/i2c/ov9650.c
drivers/media/i2c/s5c73m3/s5c73m3-core.c
drivers/media/i2c/s5k4ecgx.c
drivers/media/i2c/s5k5baf.c
drivers/media/i2c/s5k6a3.c
drivers/media/i2c/s5k6aa.c
drivers/media/i2c/smiapp/smiapp-core.c
drivers/media/i2c/tc358743.c
drivers/media/i2c/tvp514x.c
drivers/media/i2c/tvp7002.c
drivers/media/media-entity.c
drivers/media/platform/exynos4-is/fimc-capture.c
drivers/media/platform/exynos4-is/fimc-isp-video.c
drivers/media/platform/exynos4-is/fimc-isp.c
drivers/media/platform/exynos4-is/fimc-lite.c
drivers/media/platform/exynos4-is/fimc-m2m.c
drivers/media/platform/exynos4-is/mipi-csis.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/omap3isp/ispstat.c
drivers/media/platform/omap3isp/ispvideo.c
drivers/media/platform/s3c-camif/camif-capture.c
drivers/media/platform/vsp1/vsp1_entity.c
drivers/media/platform/vsp1/vsp1_video.c
drivers/media/platform/xilinx/xilinx-dma.c
drivers/media/platform/xilinx/xilinx-tpg.c
drivers/media/usb/au0828/au0828-video.c
drivers/media/usb/cx231xx/cx231xx-video.c
drivers/media/usb/uvc/uvc_entity.c
drivers/media/v4l2-core/tuner-core.c
drivers/media/v4l2-core/v4l2-flash-led-class.c
drivers/staging/media/davinci_vpfe/dm365_ipipe.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_video.c
drivers/staging/media/omap4iss/iss_csi2.c
drivers/staging/media/omap4iss/iss_ipipe.c
drivers/staging/media/omap4iss/iss_ipipeif.c
drivers/staging/media/omap4iss/iss_resizer.c
drivers/staging/media/omap4iss/iss_video.c
include/media/media-entity.h

index f552a75c0e70b22b3800a3fa93c0783075228250..6903b25035774fe60143a214481600239a18379d 100644 (file)
@@ -104,7 +104,7 @@ although drivers can allocate entities directly.
 Drivers initialize entities by calling
 
        media_entity_init(struct media_entity *entity, u16 num_pads,
-                         struct media_pad *pads, u16 extra_links);
+                         struct media_pad *pads);
 
 The media_entity name, type, flags, revision and group_id fields can be
 initialized before or after calling media_entity_init. Entities embedded in
@@ -120,9 +120,8 @@ media_entity_init. The function will initialize the other pads fields.
 
 Unlike the number of pads, the total number of links isn't always known in
 advance by the entity driver. As an initial estimate, media_entity_init
-pre-allocates a number of links equal to the number of pads plus an optional
-number of extra links. The links array will be reallocated if it grows beyond
-the initial estimate.
+pre-allocates a number of links equal to the number of pads. The links array
+will be reallocated if it grows beyond the initial estimate.
 
 Drivers register entities with a media device by calling
 
index 75d5c18d689aaaaa14b7e365c9650d0502c95799..109cc37925344303caedb035fe76c1b063aee817 100644 (file)
@@ -300,7 +300,7 @@ calling media_entity_init():
        struct media_pad *pads = &my_sd->pads;
        int err;
 
-       err = media_entity_init(&sd->entity, npads, pads, 0);
+       err = media_entity_init(&sd->entity, npads, pads);
 
 The pads array must have been previously initialized. There is no need to
 manually set the struct media_entity type and name fields, but the revision
@@ -700,7 +700,7 @@ calling media_entity_init():
        struct media_pad *pad = &my_vdev->pad;
        int err;
 
-       err = media_entity_init(&vdev->entity, 1, pad, 0);
+       err = media_entity_init(&vdev->entity, 1, pad);
 
 The pads array must have been previously initialized. There is no need to
 manually set the struct media_entity type and name fields.
index 2b828e631e318c3cf2ace087b732bcaa18cb06ff..ff815cb920318593a2adeafa088d69d6f27efca9 100644 (file)
@@ -295,7 +295,7 @@ owner 域。若使用 i2c 辅助函数,这些都会帮你处理好。
        struct media_pad *pads = &my_sd->pads;
        int err;
 
-       err = media_entity_init(&sd->entity, npads, pads, 0);
+       err = media_entity_init(&sd->entity, npads, pads);
 
 pads 数组必须预先初始化。无须手动设置 media_entity 的 type 和
 name 域,但如有必要,revision 域必须初始化。
@@ -602,7 +602,7 @@ v4l2_file_operations 结构体是 file_operations 的一个子集。其主要
        struct media_pad *pad = &my_vdev->pad;
        int err;
 
-       err = media_entity_init(&vdev->entity, 1, pad, 0);
+       err = media_entity_init(&vdev->entity, 1, pad);
 
 pads 数组必须预先初始化。没有必要手动设置 media_entity 的 type 和
 name 域。
index 13bb57f0457f7f9514628c177ae00784bc4e4461..2fdcbb5f000a95e10ac775cbc8337cad03ef00a5 100644 (file)
@@ -249,7 +249,7 @@ static void dvb_register_media_device(struct dvb_device *dvbdev,
        }
 
        if (npads)
-               ret = media_entity_init(dvbdev->entity, npads, dvbdev->pads, 0);
+               ret = media_entity_init(dvbdev->entity, npads, dvbdev->pads);
        if (!ret)
                ret = media_device_register_entity(dvbdev->adapter->mdev,
                                                   dvbdev->entity);
index 0a8882cb23c38ff4d465cdc3955bdc2f91c1fea8..580859c89da17608160aab74528b8ee687585ae7 100644 (file)
@@ -769,7 +769,7 @@ static int au8522_probe(struct i2c_client *client,
        sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_DECODER;
 
        ret = media_entity_init(&sd->entity, ARRAY_SIZE(state->pads),
-                               state->pads, 0);
+                               state->pads);
        if (ret < 0) {
                v4l_info(client, "failed to initialize media entity!\n");
                return ret;
index 0494a7896aa21916bb28ac98988371cc3c46b92e..a02dc4925707c0b4cd23b91dc37bbcd4955c72d7 100644 (file)
@@ -1158,7 +1158,7 @@ static int ad9389b_probe(struct i2c_client *client, const struct i2c_device_id *
        state->rgb_quantization_range_ctrl->is_private = true;
 
        state->pad.flags = MEDIA_PAD_FL_SINK;
-       err = media_entity_init(&sd->entity, 1, &state->pad, 0);
+       err = media_entity_init(&sd->entity, 1, &state->pad);
        if (err)
                goto err_hdl;
 
index f00745bbe471fe0019552c2b54622530af50c12b..07e46b5b849cfb046e0becb32586523af6a755a3 100644 (file)
@@ -512,7 +512,7 @@ static int adp1653_probe(struct i2c_client *client,
        if (ret)
                goto free_and_quit;
 
-       ret = media_entity_init(&flash->subdev.entity, 0, NULL, 0);
+       ret = media_entity_init(&flash->subdev.entity, 0, NULL);
        if (ret < 0)
                goto free_and_quit;
 
index 3c3c4bfe386644a7afda9d1ecebd1b891737d202..0fca8677014c902b8f9fbecbabc7a1f6143b908f 100644 (file)
@@ -1214,7 +1214,7 @@ static int adv7180_probe(struct i2c_client *client,
 
        state->pad.flags = MEDIA_PAD_FL_SOURCE;
        sd->entity.flags |= MEDIA_ENT_T_V4L2_SUBDEV_DECODER;
-       ret = media_entity_init(&sd->entity, 1, &state->pad, 0);
+       ret = media_entity_init(&sd->entity, 1, &state->pad);
        if (ret)
                goto err_free_ctrl;
 
index eeb2cd823c4d1fe0d40aa7c5e57c08bab3f56cec..cbcf81b1d29e5a68410faa8d4d5912252def82ec 100644 (file)
@@ -1482,7 +1482,7 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id *
        state->rgb_quantization_range_ctrl->is_private = true;
 
        state->pad.flags = MEDIA_PAD_FL_SINK;
-       err = media_entity_init(&sd->entity, 1, &state->pad, 0);
+       err = media_entity_init(&sd->entity, 1, &state->pad);
        if (err)
                goto err_hdl;
 
index 7452862256558765e2ff5865593471bc3f07aea6..c2df7e8053f3dd2730de0f7bc93e34f16c064916 100644 (file)
@@ -3209,7 +3209,7 @@ static int adv76xx_probe(struct i2c_client *client,
        state->pads[state->source_pad].flags = MEDIA_PAD_FL_SOURCE;
 
        err = media_entity_init(&sd->entity, state->source_pad + 1,
-                               state->pads, 0);
+                               state->pads);
        if (err)
                goto err_work_queues;
 
index 69378e4914b62068fbcca3919200f83768b35ada..b5013a937254b59b0b1d6350da515af9c76cddab 100644 (file)
@@ -3309,7 +3309,7 @@ static int adv7842_probe(struct i2c_client *client,
                        adv7842_delayed_work_enable_hotplug);
 
        state->pad.flags = MEDIA_PAD_FL_SOURCE;
-       err = media_entity_init(&sd->entity, 1, &state->pad, 0);
+       err = media_entity_init(&sd->entity, 1, &state->pad);
        if (err)
                goto err_work_queues;
 
index 29a2e7034aa60a8816314ef4f4db92181746d6c3..b83c7fc988aef3d2cbd5b4cb8cc7389dc205de25 100644 (file)
@@ -827,7 +827,7 @@ static int as3645a_probe(struct i2c_client *client,
        if (ret < 0)
                goto done;
 
-       ret = media_entity_init(&flash->subdev.entity, 0, NULL, 0);
+       ret = media_entity_init(&flash->subdev.entity, 0, NULL);
        if (ret < 0)
                goto done;
 
index f2e2c34ddbbd25d105d72847b061276c8833914f..022ad5ae8869949e99aee054c69c64be3b1977dc 100644 (file)
@@ -5214,7 +5214,7 @@ static int cx25840_probe(struct i2c_client *client,
        sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_DECODER;
 
        ret = media_entity_init(&sd->entity, ARRAY_SIZE(state->pads),
-                               state->pads, 0);
+                               state->pads);
        if (ret < 0) {
                v4l_info(client, "failed to initialize media entity!\n");
                return ret;
index 19ecb88010647d95b7a22b739d54b4720eda162f..91c1ed27a458a08de21adf86041df6ea1a33579e 100644 (file)
@@ -365,7 +365,7 @@ static int lm3560_subdev_init(struct lm3560_flash *flash,
        rval = lm3560_init_controls(flash, led_no);
        if (rval)
                goto err_out;
-       rval = media_entity_init(&flash->subdev_led[led_no].entity, 0, NULL, 0);
+       rval = media_entity_init(&flash->subdev_led[led_no].entity, 0, NULL);
        if (rval < 0)
                goto err_out;
        flash->subdev_led[led_no].entity.type = MEDIA_ENT_T_V4L2_SUBDEV_FLASH;
index 7fbe6ff1c4f4f74c96f0901a32f9a2a450960d3f..a037616bbab0e3efb98d3bf135319162bfb36832 100644 (file)
@@ -282,7 +282,7 @@ static int lm3646_subdev_init(struct lm3646_flash *flash)
        rval = lm3646_init_controls(flash);
        if (rval)
                goto err_out;
-       rval = media_entity_init(&flash->subdev_led.entity, 0, NULL, 0);
+       rval = media_entity_init(&flash->subdev_led.entity, 0, NULL);
        if (rval < 0)
                goto err_out;
        flash->subdev_led.entity.type = MEDIA_ENT_T_V4L2_SUBDEV_FLASH;
index f8993933416e793954a175c7b648a6a290f4ead6..0788c1908f9c0c5d824fab1b8eeb640606a145ea 100644 (file)
@@ -975,7 +975,7 @@ static int m5mols_probe(struct i2c_client *client,
 
        sd->internal_ops = &m5mols_subdev_internal_ops;
        info->pad.flags = MEDIA_PAD_FL_SOURCE;
-       ret = media_entity_init(&sd->entity, 1, &info->pad, 0);
+       ret = media_entity_init(&sd->entity, 1, &info->pad);
        if (ret < 0)
                return ret;
        sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR;
index 101cb26f9330e73e0e69fd16e782bb9d3b407e6d..a2a450839ca121177ccea3d15a970e3a77c54874 100644 (file)
@@ -799,7 +799,7 @@ static int mt9m032_probe(struct i2c_client *client,
 
        sensor->subdev.ctrl_handler = &sensor->ctrls;
        sensor->pad.flags = MEDIA_PAD_FL_SOURCE;
-       ret = media_entity_init(&sensor->subdev.entity, 1, &sensor->pad, 0);
+       ret = media_entity_init(&sensor->subdev.entity, 1, &sensor->pad);
        if (ret < 0)
                goto error_ctrl;
 
index a3da0e977d0b3590442d9be8dcd2384a4783c475..165f29cddca6d1772ab08c01435139f0b6980d21 100644 (file)
@@ -1112,7 +1112,7 @@ static int mt9p031_probe(struct i2c_client *client,
        mt9p031->subdev.internal_ops = &mt9p031_subdev_internal_ops;
 
        mt9p031->pad.flags = MEDIA_PAD_FL_SOURCE;
-       ret = media_entity_init(&mt9p031->subdev.entity, 1, &mt9p031->pad, 0);
+       ret = media_entity_init(&mt9p031->subdev.entity, 1, &mt9p031->pad);
        if (ret < 0)
                goto done;
 
index b28fdff1d3107d399ef6e0dce1e77875bead0183..7d3df84651d8851f8e9f064fe3c459d1dee4cfa2 100644 (file)
@@ -933,7 +933,7 @@ static int mt9t001_probe(struct i2c_client *client,
        mt9t001->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
 
        mt9t001->pad.flags = MEDIA_PAD_FL_SOURCE;
-       ret = media_entity_init(&mt9t001->subdev.entity, 1, &mt9t001->pad, 0);
+       ret = media_entity_init(&mt9t001->subdev.entity, 1, &mt9t001->pad);
 
 done:
        if (ret < 0) {
index 1dbbd23fdfb039f2b26b4fc9c20fee6a39e5c265..b4f0f042c6c3b3a358b0adf6f56d5922a5cb9a17 100644 (file)
@@ -1046,7 +1046,7 @@ static int mt9v032_probe(struct i2c_client *client,
        mt9v032->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
 
        mt9v032->pad.flags = MEDIA_PAD_FL_SOURCE;
-       ret = media_entity_init(&mt9v032->subdev.entity, 1, &mt9v032->pad, 0);
+       ret = media_entity_init(&mt9v032->subdev.entity, 1, &mt9v032->pad);
        if (ret < 0)
                goto err;
 
index 69e4f3031d8b93cfd5f563ff6566c48605cf7c07..2e614ad473f1f08db7d85cb5092d7771420c6732 100644 (file)
@@ -780,7 +780,7 @@ static int noon010_probe(struct i2c_client *client,
 
        info->pad.flags = MEDIA_PAD_FL_SOURCE;
        sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR;
-       ret = media_entity_init(&sd->entity, 1, &info->pad, 0);
+       ret = media_entity_init(&sd->entity, 1, &info->pad);
        if (ret < 0)
                goto np_err;
 
index 82c7ac1cc88e89d022c4850ae9e2c008cb880e8b..ea95f854a51959aebb74c9c4f3dc96f198c6193c 100644 (file)
@@ -1446,7 +1446,7 @@ static int ov2659_probe(struct i2c_client *client,
 #if defined(CONFIG_MEDIA_CONTROLLER)
        ov2659->pad.flags = MEDIA_PAD_FL_SOURCE;
        sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR;
-       ret = media_entity_init(&sd->entity, 1, &ov2659->pad, 0);
+       ret = media_entity_init(&sd->entity, 1, &ov2659->pad);
        if (ret < 0) {
                v4l2_ctrl_handler_free(&ov2659->ctrls);
                return ret;
index 9fe9006474b2b58962667fe0da23f414810f5fc6..b4c408f2a2b0d81117124fd5058ad2707c2d9de9 100644 (file)
@@ -1501,7 +1501,7 @@ static int ov965x_probe(struct i2c_client *client,
 
        ov965x->pad.flags = MEDIA_PAD_FL_SOURCE;
        sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR;
-       ret = media_entity_init(&sd->entity, 1, &ov965x->pad, 0);
+       ret = media_entity_init(&sd->entity, 1, &ov965x->pad);
        if (ret < 0)
                return ret;
 
index 25f5e79dc9bc5af61f984e6f2595cf91780d0285..381f903831f4700e5dfdb348b415b05d7b1097a0 100644 (file)
@@ -1691,7 +1691,7 @@ static int s5c73m3_probe(struct i2c_client *client,
        sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV;
 
        ret = media_entity_init(&sd->entity, S5C73M3_NUM_PADS,
-                                                       state->sensor_pads, 0);
+                                                       state->sensor_pads);
        if (ret < 0)
                return ret;
 
@@ -1707,7 +1707,7 @@ static int s5c73m3_probe(struct i2c_client *client,
        oif_sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV;
 
        ret = media_entity_init(&oif_sd->entity, OIF_NUM_PADS,
-                                                       state->oif_pads, 0);
+                                                       state->oif_pads);
        if (ret < 0)
                return ret;
 
index 6757aca2cdabe000febe423d5e6cb21b0bab8949..445a89e30949df2b23714d86d29df0b8c90e658c 100644 (file)
@@ -962,7 +962,7 @@ static int s5k4ecgx_probe(struct i2c_client *client,
 
        priv->pad.flags = MEDIA_PAD_FL_SOURCE;
        sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR;
-       ret = media_entity_init(&sd->entity, 1, &priv->pad, 0);
+       ret = media_entity_init(&sd->entity, 1, &priv->pad);
        if (ret)
                return ret;
 
index 774e0d0c94cb3b1972681191b51c3731b306e28e..30a9ca62e034dce3ed9c177836f9a3dc14792e58 100644 (file)
@@ -1905,7 +1905,7 @@ static int s5k5baf_configure_subdevs(struct s5k5baf *state,
 
        state->cis_pad.flags = MEDIA_PAD_FL_SOURCE;
        sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR;
-       ret = media_entity_init(&sd->entity, NUM_CIS_PADS, &state->cis_pad, 0);
+       ret = media_entity_init(&sd->entity, NUM_CIS_PADS, &state->cis_pad);
        if (ret < 0)
                goto err;
 
@@ -1920,7 +1920,7 @@ static int s5k5baf_configure_subdevs(struct s5k5baf *state,
        state->pads[PAD_CIS].flags = MEDIA_PAD_FL_SINK;
        state->pads[PAD_OUT].flags = MEDIA_PAD_FL_SOURCE;
        sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV;
-       ret = media_entity_init(&sd->entity, NUM_ISP_PADS, state->pads, 0);
+       ret = media_entity_init(&sd->entity, NUM_ISP_PADS, state->pads);
 
        if (!ret)
                return 0;
index b1b1574dfb95d70e020b117629919cf44eb194e6..2434a79447818546214a6511038550eda09adaa2 100644 (file)
@@ -333,7 +333,7 @@ static int s5k6a3_probe(struct i2c_client *client,
        sensor->format.height = S5K6A3_DEFAULT_HEIGHT;
 
        sensor->pad.flags = MEDIA_PAD_FL_SOURCE;
-       ret = media_entity_init(&sd->entity, 1, &sensor->pad, 0);
+       ret = media_entity_init(&sd->entity, 1, &sensor->pad);
        if (ret < 0)
                return ret;
 
index 60aaff7190d24ee7e4ceaf589f7ea390c167c7b1..31be29d250932df9d6392712c421dc3b0e80025d 100644 (file)
@@ -1578,7 +1578,7 @@ static int s5k6aa_probe(struct i2c_client *client,
 
        s5k6aa->pad.flags = MEDIA_PAD_FL_SOURCE;
        sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_SENSOR;
-       ret = media_entity_init(&sd->entity, 1, &s5k6aa->pad, 0);
+       ret = media_entity_init(&sd->entity, 1, &s5k6aa->pad);
        if (ret)
                return ret;
 
index fb39dfd55e7531ccd9e24a952454f9b050023dee..7ed0538ea8db2ae9aca275b8f3a872e1dc4a35a9 100644 (file)
@@ -2488,7 +2488,7 @@ static int smiapp_register_subdevs(struct smiapp_sensor *sensor)
                        continue;
 
                rval = media_entity_init(&this->sd.entity,
-                                        this->npads, this->pads, 0);
+                                        this->npads, this->pads);
                if (rval) {
                        dev_err(&client->dev,
                                "media_entity_init failed\n");
@@ -3078,7 +3078,7 @@ static int smiapp_probe(struct i2c_client *client,
 
        sensor->src->pads[0].flags = MEDIA_PAD_FL_SOURCE;
        rval = media_entity_init(&sensor->src->sd.entity, 2,
-                                sensor->src->pads, 0);
+                                sensor->src->pads);
        if (rval < 0)
                return rval;
 
index 77b801152ea590fb800cbe3f978f4f13f8f63ac8..78e5b644d4006066968c4fb41ec9e22e9562ee40 100644 (file)
@@ -1889,7 +1889,7 @@ static int tc358743_probe(struct i2c_client *client,
        }
 
        state->pad.flags = MEDIA_PAD_FL_SOURCE;
-       err = media_entity_init(&sd->entity, 1, &state->pad, 0);
+       err = media_entity_init(&sd->entity, 1, &state->pad);
        if (err < 0)
                goto err_hdl;
 
index b5dba5b7ce3a6670b7c5d1a471a7bed175b546c1..11e426dbe89197c1e1de416834b031f7d4d7fdd1 100644 (file)
@@ -1097,7 +1097,7 @@ tvp514x_probe(struct i2c_client *client, const struct i2c_device_id *id)
        decoder->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
        decoder->sd.entity.flags |= MEDIA_ENT_T_V4L2_SUBDEV_DECODER;
 
-       ret = media_entity_init(&decoder->sd.entity, 1, &decoder->pad, 0);
+       ret = media_entity_init(&decoder->sd.entity, 1, &decoder->pad);
        if (ret < 0) {
                v4l2_err(sd, "%s decoder driver failed to register !!\n",
                         sd->name);
index 772a3043ae3b9897a9380e2a7110487a95f192d3..a5ee2b8df4294a8fa59c68dbde3d436398e7962d 100644 (file)
@@ -1014,7 +1014,7 @@ static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id)
        device->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
        device->sd.entity.flags |= MEDIA_ENT_T_V4L2_SUBDEV_DECODER;
 
-       error = media_entity_init(&device->sd.entity, 1, &device->pad, 0);
+       error = media_entity_init(&device->sd.entity, 1, &device->pad);
        if (error < 0)
                return error;
 #endif
index 767fe55ba08eece04b1873250dc09683a3af641e..eabcbacfe387c577af8b6677345613b4e95ce8dc 100644 (file)
  * media_entity_init - Initialize a media entity
  *
  * @num_pads: Total number of sink and source pads.
- * @extra_links: Initial estimate of the number of extra links.
  * @pads: Array of 'num_pads' pads.
  *
  * The total number of pads is an intrinsic property of entities known by the
  * entity driver, while the total number of links depends on hardware design
  * and is an extrinsic property unknown to the entity driver. However, in most
- * use cases the entity driver can guess the number of links which can safely
- * be assumed to be equal to or larger than the number of pads.
+ * use cases the number of links can safely be assumed to be equal to or
+ * larger than the number of pads.
  *
- * For those reasons the links array can be preallocated based on the entity
- * driver guess and will be reallocated later if extra links need to be
- * created.
+ * For those reasons the links array can be preallocated based on the number
+ * of pads and will be reallocated later if extra links need to be created.
  *
  * This function allocates a links array with enough space to hold at least
- * 'num_pads' + 'extra_links' elements. The media_entity::max_links field will
- * be set to the number of allocated elements.
+ * 'num_pads' elements. The media_entity::max_links field will be set to the
+ * number of allocated elements.
  *
  * The pads array is managed by the entity driver and passed to
  * media_entity_init() where its pointer will be stored in the entity structure.
  */
 int
 media_entity_init(struct media_entity *entity, u16 num_pads,
-                 struct media_pad *pads, u16 extra_links)
+                 struct media_pad *pads)
 {
        struct media_link *links;
-       unsigned int max_links = num_pads + extra_links;
+       unsigned int max_links = num_pads;
        unsigned int i;
 
        links = kzalloc(max_links * sizeof(links[0]), GFP_KERNEL);
index 0d549a6c8a13cac5e35fb95d6b47fb943a06f1ce..8f5bee42783f1b8f037a8666f45217c472368c8e 100644 (file)
@@ -1800,7 +1800,7 @@ static int fimc_register_capture_device(struct fimc_dev *fimc,
        vid_cap->wb_fmt.code = fmt->mbus_code;
 
        vid_cap->vd_pad.flags = MEDIA_PAD_FL_SINK;
-       ret = media_entity_init(&vfd->entity, 1, &vid_cap->vd_pad, 0);
+       ret = media_entity_init(&vfd->entity, 1, &vid_cap->vd_pad);
        if (ret)
                goto err_free_ctx;
 
@@ -1893,7 +1893,7 @@ int fimc_initialize_capture_subdev(struct fimc_dev *fimc)
        fimc->vid_cap.sd_pads[FIMC_SD_PAD_SINK_FIFO].flags = MEDIA_PAD_FL_SINK;
        fimc->vid_cap.sd_pads[FIMC_SD_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
        ret = media_entity_init(&sd->entity, FIMC_SD_PADS_NUM,
-                               fimc->vid_cap.sd_pads, 0);
+                               fimc->vid_cap.sd_pads);
        if (ret)
                return ret;
 
index 0dd22ec666941014eaff7dc122054dfb22e32095..817226d52b74213294be027604551ba5f0929720 100644 (file)
@@ -617,7 +617,7 @@ int fimc_isp_video_device_register(struct fimc_isp *isp,
        vdev->lock = &isp->video_lock;
 
        iv->pad.flags = MEDIA_PAD_FL_SINK;
-       ret = media_entity_init(&vdev->entity, 1, &iv->pad, 0);
+       ret = media_entity_init(&vdev->entity, 1, &iv->pad);
        if (ret < 0)
                return ret;
 
index 5d78f5716f3b8d2f77e27fde9192e2601c437867..f52eebf765c17828930d0b8b1a1549caef2f03d8 100644 (file)
@@ -709,7 +709,7 @@ int fimc_isp_subdev_create(struct fimc_isp *isp)
        isp->subdev_pads[FIMC_ISP_SD_PAD_SRC_FIFO].flags = MEDIA_PAD_FL_SOURCE;
        isp->subdev_pads[FIMC_ISP_SD_PAD_SRC_DMA].flags = MEDIA_PAD_FL_SOURCE;
        ret = media_entity_init(&sd->entity, FIMC_ISP_SD_PADS_NUM,
-                               isp->subdev_pads, 0);
+                               isp->subdev_pads);
        if (ret)
                return ret;
 
index 639ee710499ed79838a3c121cd944dfd95033791..2ce670425cd96b794eddf8fc1fa81df0c81cbcba 100644 (file)
@@ -1316,7 +1316,7 @@ static int fimc_lite_subdev_registered(struct v4l2_subdev *sd)
                return ret;
 
        fimc->vd_pad.flags = MEDIA_PAD_FL_SINK;
-       ret = media_entity_init(&vfd->entity, 1, &fimc->vd_pad, 0);
+       ret = media_entity_init(&vfd->entity, 1, &fimc->vd_pad);
        if (ret < 0)
                return ret;
 
@@ -1431,7 +1431,7 @@ static int fimc_lite_create_capture_subdev(struct fimc_lite *fimc)
        fimc->subdev_pads[FLITE_SD_PAD_SOURCE_DMA].flags = MEDIA_PAD_FL_SOURCE;
        fimc->subdev_pads[FLITE_SD_PAD_SOURCE_ISP].flags = MEDIA_PAD_FL_SOURCE;
        ret = media_entity_init(&sd->entity, FLITE_SD_PADS_NUM,
-                               fimc->subdev_pads, 0);
+                               fimc->subdev_pads);
        if (ret)
                return ret;
 
index 5aa857c7b631e602b4a60f961dd91d828d4468ae..8ff4e6f76b8489eb5aec6fb100530b9c03f4f0a0 100644 (file)
@@ -739,7 +739,7 @@ int fimc_register_m2m_device(struct fimc_dev *fimc,
                return PTR_ERR(fimc->m2m.m2m_dev);
        }
 
-       ret = media_entity_init(&vfd->entity, 0, NULL, 0);
+       ret = media_entity_init(&vfd->entity, 0, NULL);
        if (ret)
                goto err_me;
 
index ff5dabf24694ae5b33ceb1ffa70a0a0d2bf43ab6..8847797b0d0b4ee8ed15868366e951cceb74c638 100644 (file)
@@ -867,7 +867,7 @@ static int s5pcsis_probe(struct platform_device *pdev)
        state->pads[CSIS_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
        state->pads[CSIS_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
        ret = media_entity_init(&state->sd.entity,
-                               CSIS_PADS_NUM, state->pads, 0);
+                               CSIS_PADS_NUM, state->pads);
        if (ret < 0)
                goto e_clkdis;
 
index a6a61cce43ddadf6ca095990289852f5b3d86aca..3b10304b580bd818177f17a3b8904d3705142d7a 100644 (file)
@@ -2650,7 +2650,7 @@ static int ccdc_init_entities(struct isp_ccdc_device *ccdc)
        pads[CCDC_PAD_SOURCE_OF].flags = MEDIA_PAD_FL_SOURCE;
 
        me->ops = &ccdc_media_ops;
-       ret = media_entity_init(me, CCDC_PADS_NUM, pads, 0);
+       ret = media_entity_init(me, CCDC_PADS_NUM, pads);
        if (ret < 0)
                return ret;
 
index 38e6a974c5b1e8cd58ae6263d936ea0c42d791e4..e1b5f5bea541fbd9adc50c6b9795cf5a7d94f2eb 100644 (file)
@@ -1071,7 +1071,7 @@ static int ccp2_init_entities(struct isp_ccp2_device *ccp2)
        pads[CCP2_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
 
        me->ops = &ccp2_media_ops;
-       ret = media_entity_init(me, CCP2_PADS_NUM, pads, 0);
+       ret = media_entity_init(me, CCP2_PADS_NUM, pads);
        if (ret < 0)
                return ret;
 
index a78338d012b4df76cea20b0ff882c62a2d28edf0..6fff92f0813a035eb936f81160d22354870b247d 100644 (file)
@@ -1245,7 +1245,7 @@ static int csi2_init_entities(struct isp_csi2_device *csi2)
                                    | MEDIA_PAD_FL_MUST_CONNECT;
 
        me->ops = &csi2_media_ops;
-       ret = media_entity_init(me, CSI2_PADS_NUM, pads, 0);
+       ret = media_entity_init(me, CSI2_PADS_NUM, pads);
        if (ret < 0)
                return ret;
 
index 13803270d1045ee7d02ec04be642793c30b273fe..b440c6342ca49675be172ed80923638bdc08e96b 100644 (file)
@@ -2282,7 +2282,7 @@ static int preview_init_entities(struct isp_prev_device *prev)
        pads[PREV_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
 
        me->ops = &preview_media_ops;
-       ret = media_entity_init(me, PREV_PADS_NUM, pads, 0);
+       ret = media_entity_init(me, PREV_PADS_NUM, pads);
        if (ret < 0)
                return ret;
 
index 7cfb43dc0ffd7764c89bc95eae87ac97e53271e8..3deb1ec4a973a2b20050f86071d4dae97836b34c 100644 (file)
@@ -1728,7 +1728,7 @@ static int resizer_init_entities(struct isp_res_device *res)
        pads[RESZ_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
 
        me->ops = &resizer_media_ops;
-       ret = media_entity_init(me, RESZ_PADS_NUM, pads, 0);
+       ret = media_entity_init(me, RESZ_PADS_NUM, pads);
        if (ret < 0)
                return ret;
 
index 94d4c295d3d00ff4f3442f7c069c978ce4e00f07..f7a5eee9f11d53921b700dbf46324f9453cb3c51 100644 (file)
@@ -1028,7 +1028,7 @@ static int isp_stat_init_entities(struct ispstat *stat, const char *name,
        stat->pad.flags = MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_MUST_CONNECT;
        me->ops = NULL;
 
-       return media_entity_init(me, 1, &stat->pad, 0);
+       return media_entity_init(me, 1, &stat->pad);
 }
 
 int omap3isp_stat_init(struct ispstat *stat, const char *name,
index ecadca3e945b4449965e56bfcf5946d47ab28bb1..963cb9318873d0c8f073c3fcffbe24fff1762004 100644 (file)
@@ -1367,7 +1367,7 @@ int omap3isp_video_init(struct isp_video *video, const char *name)
        if (IS_ERR(video->alloc_ctx))
                return PTR_ERR(video->alloc_ctx);
 
-       ret = media_entity_init(&video->video.entity, 1, &video->pad, 0);
+       ret = media_entity_init(&video->video.entity, 1, &video->pad);
        if (ret < 0) {
                vb2_dma_contig_cleanup_ctx(video->alloc_ctx);
                return ret;
index ec3abbed87d9051e56032f3df1c1aeeaecbc5978..a87ac16273a048a2a193689ab6c9505d3d11a617 100644 (file)
@@ -1144,7 +1144,7 @@ int s3c_camif_register_video_node(struct camif_dev *camif, int idx)
                goto err_vd_rel;
 
        vp->pad.flags = MEDIA_PAD_FL_SINK;
-       ret = media_entity_init(&vfd->entity, 1, &vp->pad, 0);
+       ret = media_entity_init(&vfd->entity, 1, &vp->pad);
        if (ret)
                goto err_vd_rel;
 
@@ -1560,7 +1560,7 @@ int s3c_camif_create_subdev(struct camif_dev *camif)
        camif->pads[CAMIF_SD_PAD_SOURCE_P].flags = MEDIA_PAD_FL_SOURCE;
 
        ret = media_entity_init(&sd->entity, CAMIF_SD_PADS_NUM,
-                               camif->pads, 0);
+                               camif->pads);
        if (ret)
                return ret;
 
index fd95a75b04f4c04ae63218f1f774e8f3fe7bf760..619942ff2058f41d6929464218e7ce36f8cfcfde 100644 (file)
@@ -220,7 +220,7 @@ int vsp1_entity_init(struct vsp1_device *vsp1, struct vsp1_entity *entity,
 
        /* Initialize the media entity. */
        return media_entity_init(&entity->subdev.entity, num_pads,
-                                entity->pads, 0);
+                                entity->pads);
 }
 
 void vsp1_entity_destroy(struct vsp1_entity *entity)
index 45eb65fa23dbbc20b05f82c05948541c39ad0996..fb52683b5c2228e7ed4c1ba6c6a7c3fcbc5ba5ec 100644 (file)
@@ -1193,7 +1193,7 @@ int vsp1_video_init(struct vsp1_video *video, struct vsp1_entity *rwpf)
        video->pipe.state = VSP1_PIPELINE_STOPPED;
 
        /* Initialize the media entity... */
-       ret = media_entity_init(&video->video.entity, 1, &video->pad, 0);
+       ret = media_entity_init(&video->video.entity, 1, &video->pad);
        if (ret < 0)
                return ret;
 
index 722758f3392412ccc41f83ef4a221961bdd93ef5..ce2d34df12ed81ca50572bd8df4230b5011230ca 100644 (file)
@@ -677,7 +677,7 @@ int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma,
        dma->pad.flags = type == V4L2_BUF_TYPE_VIDEO_CAPTURE
                       ? MEDIA_PAD_FL_SINK : MEDIA_PAD_FL_SOURCE;
 
-       ret = media_entity_init(&dma->video.entity, 1, &dma->pad, 0);
+       ret = media_entity_init(&dma->video.entity, 1, &dma->pad);
        if (ret < 0)
                goto error;
 
index 8bd7e373601953e0337f1ecb385915084759ffc2..c09ca513a9dc5d9b7be7ac05d03cc2a23fbd4269 100644 (file)
@@ -838,7 +838,7 @@ static int xtpg_probe(struct platform_device *pdev)
        subdev->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
        subdev->entity.ops = &xtpg_media_ops;
 
-       ret = media_entity_init(&subdev->entity, xtpg->npads, xtpg->pads, 0);
+       ret = media_entity_init(&subdev->entity, xtpg->npads, xtpg->pads);
        if (ret < 0)
                goto error;
 
index 0b6e97d4fd949e38b40de9bde343be3d4d56c275..57d7b9b45123cc518935c8eb6fca3c4e6855b4d8 100644 (file)
@@ -1887,12 +1887,12 @@ int au0828_analog_register(struct au0828_dev *dev,
 
 #if defined(CONFIG_MEDIA_CONTROLLER)
        dev->video_pad.flags = MEDIA_PAD_FL_SINK;
-       ret = media_entity_init(&dev->vdev.entity, 1, &dev->video_pad, 0);
+       ret = media_entity_init(&dev->vdev.entity, 1, &dev->video_pad);
        if (ret < 0)
                pr_err("failed to initialize video media entity!\n");
 
        dev->vbi_pad.flags = MEDIA_PAD_FL_SINK;
-       ret = media_entity_init(&dev->vbi_dev.entity, 1, &dev->vbi_pad, 0);
+       ret = media_entity_init(&dev->vbi_dev.entity, 1, &dev->vbi_pad);
        if (ret < 0)
                pr_err("failed to initialize vbi media entity!\n");
 #endif
index a70850fe6235ac8dc25b6c0ef63e3d633029bd0a..cbb28c9123191e24f0291701c12f78db5f5f62ef 100644 (file)
@@ -2177,7 +2177,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
        cx231xx_vdev_init(dev, &dev->vdev, &cx231xx_video_template, "video");
 #if defined(CONFIG_MEDIA_CONTROLLER)
        dev->video_pad.flags = MEDIA_PAD_FL_SINK;
-       ret = media_entity_init(&dev->vdev.entity, 1, &dev->video_pad, 0);
+       ret = media_entity_init(&dev->vdev.entity, 1, &dev->video_pad);
        if (ret < 0)
                dev_err(dev->dev, "failed to initialize video media entity!\n");
 #endif
@@ -2204,7 +2204,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
 
 #if defined(CONFIG_MEDIA_CONTROLLER)
        dev->vbi_pad.flags = MEDIA_PAD_FL_SINK;
-       ret = media_entity_init(&dev->vbi_dev.entity, 1, &dev->vbi_pad, 0);
+       ret = media_entity_init(&dev->vbi_dev.entity, 1, &dev->vbi_pad);
        if (ret < 0)
                dev_err(dev->dev, "failed to initialize vbi media entity!\n");
 #endif
index dc56a59ecadc4b5dc2185a9717256eec96ba17c0..245445491516179cf28b12caccb0a4f4c83b5b34 100644 (file)
@@ -89,10 +89,10 @@ static int uvc_mc_init_entity(struct uvc_entity *entity)
                        sizeof(entity->subdev.name));
 
                ret = media_entity_init(&entity->subdev.entity,
-                                       entity->num_pads, entity->pads, 0);
+                                       entity->num_pads, entity->pads);
        } else if (entity->vdev != NULL) {
                ret = media_entity_init(&entity->vdev->entity,
-                                       entity->num_pads, entity->pads, 0);
+                                       entity->num_pads, entity->pads);
                if (entity->flags & UVC_ENTITY_FLAG_DEFAULT)
                        entity->vdev->entity.flags |= MEDIA_ENT_FL_DEFAULT;
        } else
index 581e21ad680150091c908e29875ed69d3ac8d0f4..100b8f0696409b4ca9ce5e7bef797fcdb4852260 100644 (file)
@@ -699,7 +699,7 @@ register_client:
        t->sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV_TUNER;
        t->sd.entity.name = t->name;
 
-       ret = media_entity_init(&t->sd.entity, 1, &t->pad, 0);
+       ret = media_entity_init(&t->sd.entity, 1, &t->pad);
        if (ret < 0) {
                tuner_err("failed to initialize media entity!\n");
                kfree(t);
index 5bdfb8d5263a0270d940d697ba55b381653f048e..34c489fed55e76de1419664d448446580783ed2f 100644 (file)
@@ -651,7 +651,7 @@ struct v4l2_flash *v4l2_flash_init(
        sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
        strlcpy(sd->name, config->dev_name, sizeof(sd->name));
 
-       ret = media_entity_init(&sd->entity, 0, NULL, 0);
+       ret = media_entity_init(&sd->entity, 0, NULL);
        if (ret < 0)
                return ERR_PTR(ret);
 
index c492914768eaa5acb186cab362d48fa2dd872ae9..3badf169c419aa3e9c5b49f34c7d97c31c1f7b91 100644 (file)
@@ -1840,7 +1840,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, 0);
+       return media_entity_init(me, IPIPE_PADS_NUM, pads);
 }
 
 /*
index 8b230541b1d16a5fb0d14c3c0bf614a7923f92c4..8fb6761868986b2b060fbc5bd7534f3fb2f607e8 100644 (file)
@@ -1026,7 +1026,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, 0);
+       ret = media_entity_init(me, IPIPEIF_NUM_PADS, pads);
        if (ret)
                goto fail;
 
index 80907b46441294989db1a4ae4659efd49c2266fa..b1f01adfa7c83392af0e8f479eab1c5cc790f89d 100644 (file)
@@ -2052,7 +2052,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, 0);
+       status = media_entity_init(me, ISIF_PADS_NUM, pads);
        if (status)
                goto isif_fail;
        isif->video_out.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
index d892fee3f52fd12137b0547245bf3f6e0117193e..7275cf3d6c20e49bfd7e5ccfa110ee2ce10d8579 100644 (file)
@@ -1910,7 +1910,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, 0);
+       ret = media_entity_init(me, RESIZER_CROP_PADS_NUM, pads);
        if (ret)
                return ret;
 
@@ -1932,7 +1932,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, 0);
+       ret = media_entity_init(me, RESIZER_PADS_NUM, pads);
        if (ret)
                return ret;
 
@@ -1954,7 +1954,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, 0);
+       ret = media_entity_init(me, RESIZER_PADS_NUM, pads);
        if (ret)
                return ret;
 
index adb2bc8811aba9ae96280db18e560db0a9eec759..daae720eb82caf1fd98ab894fff956f2e0bff2c1 100644 (file)
@@ -1601,7 +1601,7 @@ int vpfe_video_init(struct vpfe_video_device *video, const char *name)
        spin_lock_init(&video->dma_queue_lock);
        mutex_init(&video->lock);
        ret = media_entity_init(&video->video_dev.entity,
-                               1, &video->pad, 0);
+                               1, &video->pad);
        if (ret < 0)
                return ret;
 
index b941035139ae8b1ff02385fc26b43fa63f3f0580..86111e39a7283f134e0e2cd4f53bef5e558adf6a 100644 (file)
@@ -1271,7 +1271,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, 0);
+       ret = media_entity_init(me, CSI2_PADS_NUM, pads);
        if (ret < 0)
                return ret;
 
index dd0abeffd893f85ed4f7fa8c707c92196ff83645..44220765fb3aa997c7f6162a4f67708b10d535cc 100644 (file)
@@ -513,7 +513,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, 0);
+       ret = media_entity_init(me, IPIPE_PADS_NUM, pads);
        if (ret < 0)
                return ret;
 
index 5f9e449e70074a78d8c2ecab35b7c2fdffdece31..d031a5f22cdcb5a0f96018a80eb47c3f1b35b337 100644 (file)
@@ -743,7 +743,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, 0);
+       ret = media_entity_init(me, IPIPEIF_PADS_NUM, pads);
        if (ret < 0)
                return ret;
 
index 108961e05f539dc9cddca92ef2577acad721d44d..11031d9de3ab44e7afdba4a138cf26eacbb0cd26 100644 (file)
@@ -785,7 +785,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, 0);
+       ret = media_entity_init(me, RESIZER_PADS_NUM, pads);
        if (ret < 0)
                return ret;
 
index e9aeca08986f905ffd8cb32e5a65574592440be2..194c41ef822c991bb01cd146f3098bcac1863c92 100644 (file)
@@ -1102,7 +1102,7 @@ int omap4iss_video_init(struct iss_video *video, const char *name)
                return -EINVAL;
        }
 
-       ret = media_entity_init(&video->video.entity, 1, &video->pad, 0);
+       ret = media_entity_init(&video->video.entity, 1, &video->pad);
        if (ret < 0)
                return ret;
 
index 197f9379975395dd259defbeb92bf0a5eccd2e86..b92366317aee03d232f85aab5a975709f1396ee6 100644 (file)
@@ -134,7 +134,7 @@ struct media_entity_graph {
 };
 
 int media_entity_init(struct media_entity *entity, u16 num_pads,
-               struct media_pad *pads, u16 extra_links);
+               struct media_pad *pads);
 void media_entity_cleanup(struct media_entity *entity);
 
 int media_entity_create_link(struct media_entity *source, u16 source_pad,