diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-09-06 09:33:39 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 12:19:00 -0200 |
commit | 0e576b76f5470a2f8b2287958a2b9a3dd0f56f10 (patch) | |
tree | 8c35b42290ca39072a406e44e20970174b7dfe80 /include/media/media-entity.h | |
parent | 77328043d9e6feb12e53a4fc5485cf664d2878e4 (diff) | |
download | lwn-0e576b76f5470a2f8b2287958a2b9a3dd0f56f10.tar.gz lwn-0e576b76f5470a2f8b2287958a2b9a3dd0f56f10.zip |
[media] media-entity.h: rename entity.type to entity.function
Entities should have one or more functions. Calling it as a
type proofed to not be correct, as an entity could eventually
have more than one type.
So, rename the field as function.
Please notice that this patch doesn't extend support for
multiple function entities. Such change will happen when
we have real case drivers using it.
No functional changes.
Acked-by: Hans Verkuil <hans.verkuil@cisco.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, 5 insertions, 4 deletions
diff --git a/include/media/media-entity.h b/include/media/media-entity.h index 0c7390d2edae..70ccd6cf14c1 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -152,7 +152,8 @@ struct media_entity_operations { * * @graph_obj: Embedded structure containing the media object common data. * @name: Entity name. - * @type: Entity type, as defined in uapi/media.h (MEDIA_ENT_T_*) + * @function: Entity main function, as defined in uapi/media.h + * (MEDIA_ENT_F_*) * @revision: Entity revision - OBSOLETE - should be removed soon. * @flags: Entity flags, as defined in uapi/media.h (MEDIA_ENT_FL_*) * @group_id: Entity group ID - OBSOLETE - should be removed soon. @@ -179,7 +180,7 @@ struct media_entity_operations { struct media_entity { struct media_gobj graph_obj; /* must be first field in struct */ const char *name; - u32 type; + u32 function; u32 revision; unsigned long flags; u32 group_id; @@ -272,7 +273,7 @@ static inline bool is_media_entity_v4l2_io(struct media_entity *entity) if (!entity) return false; - switch (entity->type) { + switch (entity->function) { case MEDIA_ENT_T_V4L2_VIDEO: case MEDIA_ENT_T_V4L2_VBI: case MEDIA_ENT_T_V4L2_SWRADIO: @@ -287,7 +288,7 @@ static inline bool is_media_entity_v4l2_subdev(struct media_entity *entity) if (!entity) return false; - switch (entity->type) { + switch (entity->function) { case MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN: case MEDIA_ENT_T_V4L2_SUBDEV_SENSOR: case MEDIA_ENT_T_V4L2_SUBDEV_FLASH: |