From patchwork Fri Nov 5 22:08:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 304872 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oA5M9Hum027735 for ; Fri, 5 Nov 2010 22:09:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753672Ab0KEWJL (ORCPT ); Fri, 5 Nov 2010 18:09:11 -0400 Received: from smtp206.alice.it ([82.57.200.102]:50266 "EHLO smtp206.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753476Ab0KEWJK (ORCPT ); Fri, 5 Nov 2010 18:09:10 -0400 Received: from jcn (87.1.14.101) by smtp206.alice.it (8.5.124.08) id 4C1A268C094E96D4; Fri, 5 Nov 2010 23:08:50 +0100 Received: from ao2 by jcn with local (Exim 4.72) (envelope-from ) id 1PEUSn-0001kH-6U; Fri, 05 Nov 2010 23:08:49 +0100 From: Antonio Ospite To: stable@kernel.org Cc: Antonio Ospite , =?UTF-8?q?Jean-Fran=C3=A7ois=20Moine?= , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH] [media] gspca - main: Fix a regression with the PS3 Eye webcam Date: Fri, 5 Nov 2010 23:08:12 +0100 Message-Id: <1288994892-6681-1-git-send-email-ospite@studenti.unina.it> X-Mailer: git-send-email 1.7.2.3 MIME-Version: 1.0 X-Face: z*RaLf`X<@C75u6Ig9}{oW$H; 1_\2t5)({*|jhM/Vb; ]yA5\I~93>J<_`<4)A{':UrE Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 05 Nov 2010 22:09:17 +0000 (UTC) diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 0fb48c0..c64299d 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -652,7 +652,7 @@ static struct usb_host_endpoint *get_ep(struct gspca_dev *gspca_dev) : USB_ENDPOINT_XFER_ISOC; i = gspca_dev->alt; /* previous alt setting */ if (gspca_dev->cam.reverse_alts) { - if (gspca_dev->audio) + if (gspca_dev->audio && i < gspca_dev->nbalt - 2) i++; while (++i < gspca_dev->nbalt) { ep = alt_xfer(&intf->altsetting[i], xfer); @@ -660,7 +660,7 @@ static struct usb_host_endpoint *get_ep(struct gspca_dev *gspca_dev) break; } } else { - if (gspca_dev->audio) + if (gspca_dev->audio && i > 1) i--; while (--i >= 0) { ep = alt_xfer(&intf->altsetting[i], xfer);