[media] media: move MEDIA_LNK_FL_INTERFACE_LINK logic to link creation
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 11 Dec 2015 20:09:13 +0000 (18:09 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 11 Jan 2016 14:19:10 +0000 (12:19 -0200)
commit82ae2a50597565cbb2c758b44a3f39adb158ef0a
treecb1a9c6a8f2ef3e453b6230a15e6aaedb014d8e4
parent313895fba2040c7f223db3d6aa6cb3b5c5022042
[media] media: move MEDIA_LNK_FL_INTERFACE_LINK logic to link creation

Instead of flagging an interface link as MEDIA_LNK_FL_INTERFACE_LINK
only when returning to userspace, do it at link creation time.

That would allow using such flag internally, and cleans up a
little bit the code for G_TOPOLOGY ioctl.

[mchehab@osg.samsung.com: folded with a fixup from Dan Carpenter,
 replacing & by &&]
Suggested-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/media-device.c
drivers/media/media-entity.c