[media] media-entity.h: get rid of revision and group_id fields
Both revision and group_id fields were never used and were always initialized to zero. Remove them. Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
@@ -59,15 +59,6 @@
|
|||||||
<para>Entity IDs can be non-contiguous. Applications must
|
<para>Entity IDs can be non-contiguous. Applications must
|
||||||
<emphasis>not</emphasis> try to enumerate entities by calling
|
<emphasis>not</emphasis> try to enumerate entities by calling
|
||||||
MEDIA_IOC_ENUM_ENTITIES with increasing id's until they get an error.</para>
|
MEDIA_IOC_ENUM_ENTITIES with increasing id's until they get an error.</para>
|
||||||
<para>Two or more entities that share a common non-zero
|
|
||||||
<structfield>group_id</structfield> value are considered as logically
|
|
||||||
grouped. Groups are used to report
|
|
||||||
<itemizedlist>
|
|
||||||
<listitem><para>ALSA, VBI and video nodes that carry the same media
|
|
||||||
stream</para></listitem>
|
|
||||||
<listitem><para>lens and flash controllers associated with a sensor</para></listitem>
|
|
||||||
</itemizedlist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<table pgwide="1" frame="none" id="media-entity-desc">
|
<table pgwide="1" frame="none" id="media-entity-desc">
|
||||||
<title>struct <structname>media_entity_desc</structname></title>
|
<title>struct <structname>media_entity_desc</structname></title>
|
||||||
@@ -106,7 +97,7 @@
|
|||||||
<entry><structfield>revision</structfield></entry>
|
<entry><structfield>revision</structfield></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>Entity revision in a driver/hardware specific format.</entry>
|
<entry>Entity revision. Always zero (obsolete)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>__u32</entry>
|
<entry>__u32</entry>
|
||||||
@@ -120,7 +111,7 @@
|
|||||||
<entry><structfield>group_id</structfield></entry>
|
<entry><structfield>group_id</structfield></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry></entry>
|
<entry></entry>
|
||||||
<entry>Entity group ID</entry>
|
<entry>Entity group ID. Always zero (obsolete)</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>__u16</entry>
|
<entry>__u16</entry>
|
||||||
|
@@ -110,10 +110,10 @@ If no pads are needed, drivers could directly fill entity->num_pads
|
|||||||
with 0 and entity->pads with NULL or to call the above function that
|
with 0 and entity->pads with NULL or to call the above function that
|
||||||
will do the same.
|
will do the same.
|
||||||
|
|
||||||
The media_entity name, type, flags, revision and group_id fields should be
|
The media_entity name, type and flags fields should be initialized before
|
||||||
initialized before calling media_device_register_entity(). Entities embedded
|
calling media_device_register_entity(). Entities embedded in higher-level
|
||||||
in higher-level standard structures can have some of those fields set by the
|
standard structures can have some of those fields set by the higher-level
|
||||||
higher-level framework.
|
framework.
|
||||||
|
|
||||||
As the number of pads is known in advance, the pads array is not allocated
|
As the number of pads is known in advance, the pads array is not allocated
|
||||||
dynamically but is managed by the entity driver. Most drivers will embed the
|
dynamically but is managed by the entity driver. Most drivers will embed the
|
||||||
@@ -164,9 +164,7 @@ Entities have flags that describe the entity capabilities and state.
|
|||||||
|
|
||||||
Logical entity groups can be defined by setting the group ID of all member
|
Logical entity groups can be defined by setting the group ID of all member
|
||||||
entities to the same non-zero value. An entity group serves no purpose in the
|
entities to the same non-zero value. An entity group serves no purpose in the
|
||||||
kernel, but is reported to userspace during entities enumeration. The group_id
|
kernel, but is reported to userspace during entities enumeration.
|
||||||
field belongs to the media device driver and must not by touched by entity
|
|
||||||
drivers.
|
|
||||||
|
|
||||||
Media device drivers should define groups if several entities are logically
|
Media device drivers should define groups if several entities are logically
|
||||||
bound together. Example usages include reporting
|
bound together. Example usages include reporting
|
||||||
|
@@ -109,9 +109,9 @@ static long media_device_enum_entities(struct media_device *mdev,
|
|||||||
if (ent->name)
|
if (ent->name)
|
||||||
strlcpy(u_ent.name, ent->name, sizeof(u_ent.name));
|
strlcpy(u_ent.name, ent->name, sizeof(u_ent.name));
|
||||||
u_ent.type = ent->function;
|
u_ent.type = ent->function;
|
||||||
u_ent.revision = ent->revision;
|
u_ent.revision = 0; /* Unused */
|
||||||
u_ent.flags = ent->flags;
|
u_ent.flags = ent->flags;
|
||||||
u_ent.group_id = ent->group_id;
|
u_ent.group_id = 0; /* Unused */
|
||||||
u_ent.pads = ent->num_pads;
|
u_ent.pads = ent->num_pads;
|
||||||
u_ent.links = ent->num_links - ent->num_backlinks;
|
u_ent.links = ent->num_links - ent->num_backlinks;
|
||||||
memcpy(&u_ent.raw, &ent->info, sizeof(ent->info));
|
memcpy(&u_ent.raw, &ent->info, sizeof(ent->info));
|
||||||
|
@@ -153,9 +153,7 @@ struct media_entity_operations {
|
|||||||
* @name: Entity name.
|
* @name: Entity name.
|
||||||
* @function: Entity main function, as defined in uapi/media.h
|
* @function: Entity main function, as defined in uapi/media.h
|
||||||
* (MEDIA_ENT_F_*)
|
* (MEDIA_ENT_F_*)
|
||||||
* @revision: Entity revision - OBSOLETE - should be removed soon.
|
|
||||||
* @flags: Entity flags, as defined in uapi/media.h (MEDIA_ENT_FL_*)
|
* @flags: Entity flags, as defined in uapi/media.h (MEDIA_ENT_FL_*)
|
||||||
* @group_id: Entity group ID - OBSOLETE - should be removed soon.
|
|
||||||
* @num_pads: Number of sink and source pads.
|
* @num_pads: Number of sink and source pads.
|
||||||
* @num_links: Total number of links, forward and back, enabled and disabled.
|
* @num_links: Total number of links, forward and back, enabled and disabled.
|
||||||
* @num_backlinks: Number of backlinks
|
* @num_backlinks: Number of backlinks
|
||||||
@@ -180,9 +178,7 @@ struct media_entity {
|
|||||||
struct media_gobj graph_obj; /* must be first field in struct */
|
struct media_gobj graph_obj; /* must be first field in struct */
|
||||||
const char *name;
|
const char *name;
|
||||||
u32 function;
|
u32 function;
|
||||||
u32 revision;
|
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
u32 group_id;
|
|
||||||
|
|
||||||
u16 num_pads;
|
u16 num_pads;
|
||||||
u16 num_links;
|
u16 num_links;
|
||||||
|
Reference in New Issue
Block a user