[media] uvcvideo: Fix control mapping for devices with multiple chains
authorStephan Lachowsky <stephan.lachowsky@maxim-ic.com>
Tue, 31 May 2011 22:24:21 +0000 (19:24 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Jul 2011 20:56:04 +0000 (17:56 -0300)
commitc0c5e71e46638e5264c193db8636132e036a4c56
treeeabbcc6ff7ebc7ec6c409269ae2ca67f6d53bb52
parentfa14001480fb264b916ed6406ead24205dc1a86c
[media] uvcvideo: Fix control mapping for devices with multiple chains

The search for matching extension units fails to take account of the
current chain.  In the case where you have two distinct video chains,
both containing an XU with the same GUID but different unit ids, you
will be unable to perform a mapping on the second chain because entity
on the first chain will always be found first

Fix this by only searching the current chain when performing a control
mapping.  This is analogous to the search used by uvc_find_control(),
and is the correct behaviour.

Signed-off-by: Stephan Lachowsky <stephan.lachowsky@maxim-ic.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/uvc/uvc_ctrl.c