diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-08-30 09:53:57 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 12:18:58 -0200 |
commit | 39d1ebc6092f8266fb788733ca92b8492b1d69f2 (patch) | |
tree | 4cb4531fc744893e515cf693659ab0f353f1bacc /drivers/media/media-device.c | |
parent | 28b6ba1106b5864e6bdd1b75840ccf5b1ca3d1b7 (diff) | |
download | op-kernel-dev-39d1ebc6092f8266fb788733ca92b8492b1d69f2.zip op-kernel-dev-39d1ebc6092f8266fb788733ca92b8492b1d69f2.tar.gz |
[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>
Diffstat (limited to 'drivers/media/media-device.c')
-rw-r--r-- | drivers/media/media-device.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index c7d9719..30cef87 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) |