[media] media: move mdev list init to gobj

Let's control the topology changes inside the graph_object. So, move the
addition and removal of interfaces/entities from the mdev lists to
media_gobj_init() and media_gobj_remove().

The main reason is that mdev should have lists for all object types, as
the new MC api will require to store objects in separate places.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
Mauro Carvalho Chehab
2015-08-23 07:51:33 -03:00
parent cf975a4b40
commit 05bfa9fa1c
4 changed files with 16 additions and 10 deletions

View File

@@ -111,11 +111,11 @@ struct media_device *media_device_find_devres(struct device *dev);
/* Iterate over all entities. */
#define media_device_for_each_entity(entity, mdev) \
list_for_each_entry(entity, &(mdev)->entities, list)
list_for_each_entry(entity, &(mdev)->entities, graph_obj.list)
/* Iterate over all interfaces. */
#define media_device_for_each_intf(intf, mdev) \
list_for_each_entry(intf, &(mdev)->interfaces, list)
list_for_each_entry(intf, &(mdev)->interfaces, graph_obj.list)
#else