aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/uvc/uvc_v4l2.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2009-11-25 10:00:22 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:42:12 -0500
commit6241d8ca1dc27356180011dff4d93a3c5b3cbd76 (patch)
treed406a9dd8f8cdad7054d5de42f3262a248e2c5d3 /drivers/media/video/uvc/uvc_v4l2.c
parentbce039c099e97b07534518b5f3c0ce31b1606ff6 (diff)
V4L/DVB (13503): uvcvideo: Merge iterms, oterms and units linked lists
All terminals and units are now added to a single linked list of entities per chain. This makes terminals and units handling code more generic. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc/uvc_v4l2.c')
-rw-r--r--drivers/media/video/uvc/uvc_v4l2.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c
index be3da56d4db3..9e1f2c208ed8 100644
--- a/drivers/media/video/uvc/uvc_v4l2.c
+++ b/drivers/media/video/uvc/uvc_v4l2.c
@@ -620,12 +620,16 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
620 (chain->dev->quirks & UVC_QUIRK_IGNORE_SELECTOR_UNIT)) { 620 (chain->dev->quirks & UVC_QUIRK_IGNORE_SELECTOR_UNIT)) {
621 if (index != 0) 621 if (index != 0)
622 return -EINVAL; 622 return -EINVAL;
623 iterm = list_first_entry(&chain->iterms, 623 list_for_each_entry(iterm, &chain->entities, chain) {
624 struct uvc_entity, chain); 624 if (UVC_ENTITY_IS_ITERM(iterm))
625 break;
626 }
625 pin = iterm->id; 627 pin = iterm->id;
626 } else if (pin < selector->selector.bNrInPins) { 628 } else if (pin < selector->selector.bNrInPins) {
627 pin = selector->selector.baSourceID[index]; 629 pin = selector->selector.baSourceID[index];
628 list_for_each_entry(iterm, chain->iterms.next, chain) { 630 list_for_each_entry(iterm, &chain->entities, chain) {
631 if (!UVC_ENTITY_IS_ITERM(iterm))
632 continue;
629 if (iterm->id == pin) 633 if (iterm->id == pin)
630 break; 634 break;
631 } 635 }