summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-12-11 05:02:19 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 09:19:04 -0500
commit8ed8c88c460fa6ce71deb9847f78a5bff4dfcb0e (patch)
tree46b906be23d4a283054abb780f1260306393c329
parentab22e77cd3d3073c8cac51b59713ef635678dfbe (diff)
[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>
-rw-r--r--Documentation/DocBook/media/v4l/media-ioc-enum-entities.xml13
-rw-r--r--Documentation/media-framework.txt12
-rw-r--r--drivers/media/media-device.c4
-rw-r--r--include/media/media-entity.h4
4 files changed, 9 insertions, 24 deletions
diff --git a/Documentation/DocBook/media/v4l/media-ioc-enum-entities.xml b/Documentation/DocBook/media/v4l/media-ioc-enum-entities.xml
index 27f8817e7abe..9f7614a01234 100644
--- a/Documentation/DocBook/media/v4l/media-ioc-enum-entities.xml
+++ b/Documentation/DocBook/media/v4l/media-ioc-enum-entities.xml
@@ -59,15 +59,6 @@
59 <para>Entity IDs can be non-contiguous. Applications must 59 <para>Entity IDs can be non-contiguous. Applications must
60 <emphasis>not</emphasis> try to enumerate entities by calling 60 <emphasis>not</emphasis> try to enumerate entities by calling
61 MEDIA_IOC_ENUM_ENTITIES with increasing id's until they get an error.</para> 61 MEDIA_IOC_ENUM_ENTITIES with increasing id's until they get an error.</para>
62 <para>Two or more entities that share a common non-zero
63 <structfield>group_id</structfield> value are considered as logically
64 grouped. Groups are used to report
65 <itemizedlist>
66 <listitem><para>ALSA, VBI and video nodes that carry the same media
67 stream</para></listitem>
68 <listitem><para>lens and flash controllers associated with a sensor</para></listitem>
69 </itemizedlist>
70 </para>
71 62
72 <table pgwide="1" frame="none" id="media-entity-desc"> 63 <table pgwide="1" frame="none" id="media-entity-desc">
73 <title>struct <structname>media_entity_desc</structname></title> 64 <title>struct <structname>media_entity_desc</structname></title>
@@ -106,7 +97,7 @@
106 <entry><structfield>revision</structfield></entry> 97 <entry><structfield>revision</structfield></entry>
107 <entry></entry> 98 <entry></entry>
108 <entry></entry> 99 <entry></entry>
109 <entry>Entity revision in a driver/hardware specific format.</entry> 100 <entry>Entity revision. Always zero (obsolete)</entry>
110 </row> 101 </row>
111 <row> 102 <row>
112 <entry>__u32</entry> 103 <entry>__u32</entry>
@@ -120,7 +111,7 @@
120 <entry><structfield>group_id</structfield></entry> 111 <entry><structfield>group_id</structfield></entry>
121 <entry></entry> 112 <entry></entry>
122 <entry></entry> 113 <entry></entry>
123 <entry>Entity group ID</entry> 114 <entry>Entity group ID. Always zero (obsolete)</entry>
124 </row> 115 </row>
125 <row> 116 <row>
126 <entry>__u16</entry> 117 <entry>__u16</entry>
diff --git a/Documentation/media-framework.txt b/Documentation/media-framework.txt
index 7fbfe4bd1f47..ef3663af1db3 100644
--- a/Documentation/media-framework.txt
+++ b/Documentation/media-framework.txt
@@ -110,10 +110,10 @@ If no pads are needed, drivers could directly fill entity->num_pads
110with 0 and entity->pads with NULL or to call the above function that 110with 0 and entity->pads with NULL or to call the above function that
111will do the same. 111will do the same.
112 112
113The media_entity name, type, flags, revision and group_id fields should be 113The media_entity name, type and flags fields should be initialized before
114initialized before calling media_device_register_entity(). Entities embedded 114calling media_device_register_entity(). Entities embedded in higher-level
115in higher-level standard structures can have some of those fields set by the 115standard structures can have some of those fields set by the higher-level
116higher-level framework. 116framework.
117 117
118As the number of pads is known in advance, the pads array is not allocated 118As the number of pads is known in advance, the pads array is not allocated
119dynamically but is managed by the entity driver. Most drivers will embed the 119dynamically 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.
164 164
165Logical entity groups can be defined by setting the group ID of all member 165Logical entity groups can be defined by setting the group ID of all member
166entities to the same non-zero value. An entity group serves no purpose in the 166entities to the same non-zero value. An entity group serves no purpose in the
167kernel, but is reported to userspace during entities enumeration. The group_id 167kernel, but is reported to userspace during entities enumeration.
168field belongs to the media device driver and must not by touched by entity
169drivers.
170 168
171Media device drivers should define groups if several entities are logically 169Media device drivers should define groups if several entities are logically
172bound together. Example usages include reporting 170bound together. Example usages include reporting
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
index b8cd7733a31c..537160bb461e 100644
--- a/drivers/media/media-device.c
+++ b/drivers/media/media-device.c
@@ -109,9 +109,9 @@ static long media_device_enum_entities(struct media_device *mdev,
109 if (ent->name) 109 if (ent->name)
110 strlcpy(u_ent.name, ent->name, sizeof(u_ent.name)); 110 strlcpy(u_ent.name, ent->name, sizeof(u_ent.name));
111 u_ent.type = ent->function; 111 u_ent.type = ent->function;
112 u_ent.revision = ent->revision; 112 u_ent.revision = 0; /* Unused */
113 u_ent.flags = ent->flags; 113 u_ent.flags = ent->flags;
114 u_ent.group_id = ent->group_id; 114 u_ent.group_id = 0; /* Unused */
115 u_ent.pads = ent->num_pads; 115 u_ent.pads = ent->num_pads;
116 u_ent.links = ent->num_links - ent->num_backlinks; 116 u_ent.links = ent->num_links - ent->num_backlinks;
117 memcpy(&u_ent.raw, &ent->info, sizeof(ent->info)); 117 memcpy(&u_ent.raw, &ent->info, sizeof(ent->info));
diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index 32fef503d950..031536723d8c 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -153,9 +153,7 @@ struct media_entity_operations {
153 * @name: Entity name. 153 * @name: Entity name.
154 * @function: Entity main function, as defined in uapi/media.h 154 * @function: Entity main function, as defined in uapi/media.h
155 * (MEDIA_ENT_F_*) 155 * (MEDIA_ENT_F_*)
156 * @revision: Entity revision - OBSOLETE - should be removed soon.
157 * @flags: Entity flags, as defined in uapi/media.h (MEDIA_ENT_FL_*) 156 * @flags: Entity flags, as defined in uapi/media.h (MEDIA_ENT_FL_*)
158 * @group_id: Entity group ID - OBSOLETE - should be removed soon.
159 * @num_pads: Number of sink and source pads. 157 * @num_pads: Number of sink and source pads.
160 * @num_links: Total number of links, forward and back, enabled and disabled. 158 * @num_links: Total number of links, forward and back, enabled and disabled.
161 * @num_backlinks: Number of backlinks 159 * @num_backlinks: Number of backlinks
@@ -180,9 +178,7 @@ struct media_entity {
180 struct media_gobj graph_obj; /* must be first field in struct */ 178 struct media_gobj graph_obj; /* must be first field in struct */
181 const char *name; 179 const char *name;
182 u32 function; 180 u32 function;
183 u32 revision;
184 unsigned long flags; 181 unsigned long flags;
185 u32 group_id;
186 182
187 u16 num_pads; 183 u16 num_pads;
188 u16 num_links; 184 u16 num_links;