[media] media-device: supress backlinks at G_TOPOLOGY ioctl
Due to the graph traversal algorithm currently in usage, we need a copy of all data links. Those backlinks should not be send to userspace, as otherwise, all links there will be duplicated. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
@@ -333,6 +333,9 @@ static long __media_device_get_topology(struct media_device *mdev,
|
||||
/* Get links and number of links */
|
||||
i = 0;
|
||||
media_device_for_each_link(link, mdev) {
|
||||
if (link->is_backlink)
|
||||
continue;
|
||||
|
||||
i++;
|
||||
|
||||
if (ret || !topo->links)
|
||||
|
Reference in New Issue
Block a user