diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-08-14 15:42:05 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 15:18:40 +0100 |
commit | fa762394fd85c838ade769990478bc4e01fd95e8 (patch) | |
tree | 426b044963d02003fb341dd29fbc1fa4d6213f8d /include | |
parent | [media] au0828: Fix the logic that enables the analog demoder link (diff) | |
download | linux-fa762394fd85c838ade769990478bc4e01fd95e8.tar.xz linux-fa762394fd85c838ade769990478bc4e01fd95e8.zip |
[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')
-rw-r--r-- | include/media/media-entity.h | 5 |
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 |