From patchwork Sat Sep 5 00:14:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 45882 X-Patchwork-Delegate: dougsland@redhat.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n850dRiT032376 for ; Sat, 5 Sep 2009 00:39:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964799AbZIEA0w (ORCPT ); Fri, 4 Sep 2009 20:26:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934641AbZIEA0M (ORCPT ); Fri, 4 Sep 2009 20:26:12 -0400 Received: from kroah.org ([198.145.64.141]:42286 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934593AbZIEAVU (ORCPT ); Fri, 4 Sep 2009 20:21:20 -0400 Received: from localhost (c-98-246-45-209.hsd1.or.comcast.net [98.246.45.209]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by coco.kroah.org (Postfix) with ESMTPSA id 8E76249113; Fri, 4 Sep 2009 17:21:22 -0700 (PDT) X-Mailbox-Line: From gregkh@mini.kroah.org Fri Sep 4 17:14:55 2009 Message-Id: <20090905001455.863242923@mini.kroah.org> User-Agent: quilt/0.48-1 Date: Fri, 04 Sep 2009 17:14:30 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Jim Paris , linux-media@vger.kernel.org, Jean-Francois Moine Subject: [patch 55/71] gspca - ov534: Fix ov772x References: <20090905001335.106974681@mini.kroah.org> Content-Disposition: inline; filename=gspca-ov534-fix-ov772x.patch Lines: 31 In-Reply-To: <20090905001824.GA18171@kroah.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 2.6.30-stable review patch. If anyone has any objections, please let us know. ------------------ From: Jean-Francois Moine The scan of the image packets of the sensor ov772x was broken when the sensor ov965x was added. [ Based on upstream c874f3aa, modified slightly for v2.6.30.5 ] Signed-off-by: Jim Paris Acked-by: Jean-Francois Moine Signed-off-by: Greg Kroah-Hartman --- drivers/media/video/gspca/ov534.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/media/video/gspca/ov534.c +++ b/drivers/media/video/gspca/ov534.c @@ -832,9 +832,11 @@ static void sd_pkt_scan(struct gspca_dev __u32 this_pts; u16 this_fid; int remaining_len = len; + int payload_len; + payload_len = (sd->sensor == SENSOR_OV772X) ? 2048 : 2040; do { - len = min(remaining_len, 2040); /*fixme: was 2048*/ + len = min(remaining_len, payload_len); /* Payloads are prefixed with a UVC-style header. We consider a frame to start when the FID toggles, or the PTS