aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/media/media-device.h3
-rw-r--r--include/media/media-entity.h9
2 files changed, 6 insertions, 6 deletions
diff --git a/include/media/media-device.h b/include/media/media-device.h
index a44f18fdf321..f6deef6e5820 100644
--- a/include/media/media-device.h
+++ b/include/media/media-device.h
@@ -41,7 +41,7 @@ struct device;
* @bus_info: Unique and stable device location identifier
* @hw_revision: Hardware device revision
* @driver_version: Device driver version
- * @entity_id: ID of the next entity to be registered
+ * @entity_id: Unique ID used on the last entity registered
* @entities: List of registered entities
* @lock: Entities list lock
* @graph_mutex: Entities graph operation lock
@@ -69,6 +69,7 @@ struct media_device {
u32 driver_version;
u32 entity_id;
+
struct list_head entities;
/* Protects the entities list */
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)