From 39d1ebc6092f8266fb788733ca92b8492b1d69f2 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 30 Aug 2015 09:53:57 -0300 Subject: [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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/media-device.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/media/media-device.c') diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index c7d97190a67e..30cef8740afa 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c @@ -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) -- cgit v1.2.3-59-g8ed1b