diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-06-21 05:35:04 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-07-06 14:26:47 -0400 |
commit | 4807063faa08f279b4ca9c2b1f0101a4670f7d43 (patch) | |
tree | 4e929cb998ac301f154f91afbf7d80b3214779a3 /drivers/media/video/uvc | |
parent | c854a48a97feb94ccd4501593badd1b9907326c2 (diff) |
[media] uvcvideo: Fix alternate setting selection
The alternate setting number is not equal to the alternate setting index
in the interface alternate settings table. Use the alternate setting
number from the interface descriptor when calling usb_set_interface().
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc')
-rw-r--r-- | drivers/media/video/uvc/uvc_video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c index 39f5c85dd4b4..7ac4347ca09e 100644 --- a/drivers/media/video/uvc/uvc_video.c +++ b/drivers/media/video/uvc/uvc_video.c | |||
@@ -1598,7 +1598,7 @@ static int uvc_init_video(struct uvc_streaming *stream, gfp_t gfp_flags) | |||
1598 | psize = le16_to_cpu(ep->desc.wMaxPacketSize); | 1598 | psize = le16_to_cpu(ep->desc.wMaxPacketSize); |
1599 | psize = (psize & 0x07ff) * (1 + ((psize >> 11) & 3)); | 1599 | psize = (psize & 0x07ff) * (1 + ((psize >> 11) & 3)); |
1600 | if (psize >= bandwidth && psize <= best_psize) { | 1600 | if (psize >= bandwidth && psize <= best_psize) { |
1601 | altsetting = i; | 1601 | altsetting = alts->desc.bAlternateSetting; |
1602 | best_psize = psize; | 1602 | best_psize = psize; |
1603 | best_ep = ep; | 1603 | best_ep = ep; |
1604 | } | 1604 | } |