[media] media: Use entity enums in graph walk

This will also mean that the necessary graph related data structures will
be allocated dynamically, removing the need for maximum ID checks.

Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
Sakari Ailus 2015-12-16 11:32:28 -02:00 • committed by Mauro Carvalho Chehab
commit 29d8da02d1
2 changed files with 8 additions and 12 deletions

View file

@ -103,7 +103,7 @@ struct media_entity_enum {
* @stack: Graph traversal stack; the stack contains information
* on the path the media entities to be walked and the
* links through which they were reached.
* @entities: Visited entities
* @ent_enum: Visited entities
* @top: The top of the stack
*/
struct media_entity_graph {
@ -112,7 +112,7 @@ struct media_entity_graph {
struct list_head *link;
} stack[MEDIA_ENTITY_ENUM_MAX_DEPTH];
DECLARE_BITMAP(entities, MEDIA_ENTITY_ENUM_MAX_ID);
struct media_entity_enum ent_enum;
int top;
};