diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-08-14 12:47:48 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 12:18:41 -0200 |
commit | bfab2aacccfc144e2cceccb71ec89f1eff1b8c51 (patch) | |
tree | 815cf4b3e15e59b00710a75348184debc3619d08 /include/media/media-entity.h | |
parent | ec6e4c950621a1d0db1e9b015ede4a3938fdfd18 (diff) | |
download | blackbird-op-linux-bfab2aacccfc144e2cceccb71ec89f1eff1b8c51.tar.gz blackbird-op-linux-bfab2aacccfc144e2cceccb71ec89f1eff1b8c51.zip |
[media] media: use media_gobj inside entities
As entities are graph objects, let's embed media_gobj
on it. That ensures an unique ID for entities that can be
global along the entire media controller.
For now, we'll keep the already existing entity ID. Such
field need to be dropped at some point, but for now, let's
not do this, to avoid needing to review all drivers and
the userspace apps.
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>
Diffstat (limited to 'include/media/media-entity.h')
-rw-r--r-- | include/media/media-entity.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/media/media-entity.h b/include/media/media-entity.h index 96626356b8f3..4faa4d830da4 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -33,10 +33,10 @@ /** * enum media_gobj_type - type of a graph object * + * @MEDIA_GRAPH_ENTITY: Identify a media entity */ enum media_gobj_type { - /* FIXME: add the types here, as we embed media_gobj */ - MEDIA_GRAPH_NONE + MEDIA_GRAPH_ENTITY, }; #define MEDIA_BITS_PER_TYPE 8 @@ -94,10 +94,9 @@ struct media_entity_operations { }; struct media_entity { + struct media_gobj graph_obj; struct list_head list; struct media_device *parent; /* Media device this entity belongs to*/ - u32 id; /* Entity ID, unique in the parent media - * device context */ const char *name; /* Entity name */ u32 type; /* Entity type (MEDIA_ENT_T_*) */ u32 revision; /* Entity revision, driver specific */ @@ -148,7 +147,7 @@ static inline u32 media_entity_subtype(struct media_entity *entity) static inline u32 media_entity_id(struct media_entity *entity) { - return entity->id; + return entity->graph_obj.id; } static inline enum media_gobj_type media_type(struct media_gobj *gobj) |