summaryrefslogtreecommitdiff
path: root/drivers/media/media-device.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-08-20 02:18:35 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 17:18:46 +0300
commit8f6d368f726bb4fa069af5ef5806f15ba6da6ad8 (patch)
treebf9dd61f3760cb9744f6558fc4a6fde4a90bdbf9 /drivers/media/media-device.c
parentada58ced508ffb75ff59f23b726ffc79ac2282fe (diff)
downloadlinux-8f6d368f726bb4fa069af5ef5806f15ba6da6ad8.tar.xz
[media] media: Don't accept early-created links
Links are graph objects that represent the links of two already existing objects in the graph. While with the current implementation, it is possible to create the links earlier, It doesn't make any sense to allow linking two objects when they are not both created. So, remove the code that would be handling those early-created links and add a BUG_ON() to ensure that. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/media-device.c')
-rw-r--r--drivers/media/media-device.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
index 138b18416460..0d85c6c28004 100644
--- a/drivers/media/media-device.c
+++ b/drivers/media/media-device.c
@@ -443,13 +443,6 @@ int __must_check media_device_register_entity(struct media_device *mdev,
media_gobj_init(mdev, MEDIA_GRAPH_ENTITY, &entity->graph_obj);
list_add_tail(&entity->list, &mdev->entities);
- /*
- * Initialize objects at the links
- * in the case where links got created before entity register
- */
- for (i = 0; i < entity->num_links; i++)
- media_gobj_init(mdev, MEDIA_GRAPH_LINK,
- &entity->links[i].graph_obj);
/* Initialize objects at the pads */
for (i = 0; i < entity->num_pads; i++)
media_gobj_init(mdev, MEDIA_GRAPH_PAD,