Use local variable to access link's flags in media_enum_links()
authorTodor Tomov <ttomov@mm-sol.com>
Fri, 11 Feb 2011 14:24:03 +0000 (16:24 +0200)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Thu, 17 Feb 2011 13:30:28 +0000 (14:30 +0100)
Local variable link is defined in media_enum_links() for more simple
access to link's data. Use it when accessing link's flags.

Signed-off-by: Todor Tomov <ttomov@mm-sol.com>
src/media.c

index 456b882..114bd13 100644 (file)
@@ -225,12 +225,12 @@ static int media_enum_links(struct media_device *media)
                                fwdlink = media_entity_add_link(source);
                                fwdlink->source = &source->pads[link->source.index];
                                fwdlink->sink = &sink->pads[link->sink.index];
-                               fwdlink->flags = links.links[i].flags;
+                               fwdlink->flags = link->flags;
 
                                backlink = media_entity_add_link(sink);
                                backlink->source = &source->pads[link->source.index];
                                backlink->sink = &sink->pads[link->sink.index];
-                               backlink->flags = links.links[i].flags;
+                               backlink->flags = link->flags;
 
                                fwdlink->twin = backlink;
                                backlink->twin = fwdlink;