summary refs log tree commit diff
path: root/include/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-08-14 10:42:05 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 12:18:40 -0200
commitfa762394fd85c838ade769990478bc4e01fd95e8 (patch)
tree426b044963d02003fb341dd29fbc1fa4d6213f8d /include/media
parent20fe0319de9aca71ba45e2f93c4a2a73dabde4da (diff)
downloadlinux-fa762394fd85c838ade769990478bc4e01fd95e8.tar.gz
[media] media: create a macro to get entity ID
Instead of accessing directly entity.id, let's create a macro,
as this field will be moved into a common struct later on.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/media-entity.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index b92366317aee..57881758927e 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -113,6 +113,11 @@ static inline u32 media_entity_subtype(struct media_entity *entity)
 	return entity->type & MEDIA_ENT_SUBTYPE_MASK;
 }
 
+static inline u32 media_entity_id(struct media_entity *entity)
+{
+	return entity->id;
+}
+
 #define MEDIA_ENTITY_ENUM_MAX_DEPTH	16
 #define MEDIA_ENTITY_ENUM_MAX_ID	64