From patchwork Sun May 22 08:16:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jean-Francois Moine X-Patchwork-Id: 6670 Return-path: Envelope-to: mchehab@pedra Delivery-date: Sun, 22 May 2011 08:44:44 -0300 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from ) id 1QO75Q-00056F-4D for mchehab@pedra; Sun, 22 May 2011 08:44:44 -0300 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Sun, 22 May 2011 08:44:44 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QO3pm-0005rS-JP; Sun, 22 May 2011 08:16:22 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752867Ab1EVIQH (ORCPT + 1 other); Sun, 22 May 2011 04:16:07 -0400 Received: from smtp5-g21.free.fr ([212.27.42.5]:43054 "EHLO smtp5-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752539Ab1EVIQF convert rfc822-to-8bit (ORCPT ); Sun, 22 May 2011 04:16:05 -0400 Received: from tele (unknown [82.245.201.222]) by smtp5-g21.free.fr (Postfix) with ESMTP id F197AD4821B for ; Sun, 22 May 2011 10:15:58 +0200 (CEST) Date: Sun, 22 May 2011 10:16:34 +0200 From: Jean-Francois Moine To: linux-media@vger.kernel.org Subject: [PATCH FOR 2.6.39] gspca - ov519: Fix a regression for ovfx2 webcams Message-ID: <20110522101634.33e10357@tele> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.4; x86_64-pc-linux-gnu) Mime-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: By git commit c42cedbb658b, the bulk transfer size was changed to a lower value for resolutions != 1600x1200, but the image extraction routine still worked with the previous value, giving bad truncated images. Signed-off-by: Jean-François Moine --- drivers/media/video/gspca/ov519.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index 36a46fc..5ac2f3c 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c @@ -4478,7 +4478,7 @@ static void ovfx2_pkt_scan(struct gspca_dev *gspca_dev, gspca_frame_add(gspca_dev, INTER_PACKET, data, len); /* A short read signals EOF */ - if (len < OVFX2_BULK_SIZE) { + if (len < gspca_dev->cam.bulk_size) { /* If the frame is short, and it is one of the first ones the sensor and bridge are still syncing, so drop it. */ if (sd->first_frame) {