[media] uvcvideo: Mark first output terminal as default video node

The MEDIA_ENT_FL_DEFAULT identifies entities that are considered as
default for their group and type. For video nodes, it identifies the
node that application should use by default.
UVC devices don't report which output terminal should be considered as
the default, use the first one. Most devices have a single output
terminal anyway.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Laurent Pinchart
2012-08-03 04:35:10 -03:00
committed by Mauro Carvalho Chehab
parent 0550513c7a
commit 8be8ec6ea5
3 changed files with 8 additions and 0 deletions

View File

@@ -1564,6 +1564,8 @@ static int uvc_scan_device(struct uvc_device *dev)
chain->dev = dev;
v4l2_prio_init(&chain->prio);
term->flags |= UVC_ENTITY_FLAG_DEFAULT;
if (uvc_scan_chain(chain, term) < 0) {
kfree(chain);
continue;