diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-08-03 04:35:10 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-11-28 10:30:00 -0200 |
commit | 8be8ec6ea58bd77338f6ffa2f6d2acfc88b835f4 (patch) | |
tree | 8bf7dcb4b5bead6f0cd726013b5493867d53b376 /drivers/media/usb/uvc/uvc_entity.c | |
parent | 0550513c7a559b4933c5e1d47fbd15d15f6078d5 (diff) | |
download | lwn-8be8ec6ea58bd77338f6ffa2f6d2acfc88b835f4.tar.gz lwn-8be8ec6ea58bd77338f6ffa2f6d2acfc88b835f4.zip |
[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>
Diffstat (limited to 'drivers/media/usb/uvc/uvc_entity.c')
-rw-r--r-- | drivers/media/usb/uvc/uvc_entity.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/usb/uvc/uvc_entity.c b/drivers/media/usb/uvc/uvc_entity.c index 29e239911d0e..dc56a59ecadc 100644 --- a/drivers/media/usb/uvc/uvc_entity.c +++ b/drivers/media/usb/uvc/uvc_entity.c @@ -93,6 +93,8 @@ static int uvc_mc_init_entity(struct uvc_entity *entity) } else if (entity->vdev != NULL) { ret = media_entity_init(&entity->vdev->entity, entity->num_pads, entity->pads, 0); + if (entity->flags & UVC_ENTITY_FLAG_DEFAULT) + entity->vdev->entity.flags |= MEDIA_ENT_FL_DEFAULT; } else ret = 0; |