summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-08-19 17:46:18 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-08 20:33:58 -0700
commit85fa9e247d081a087bed949983dde603a46114dc (patch)
tree68e081c9f974a22cc759bc13f0a254c3d05449c5
parent85481d89414655115270dc891d8604d299269c58 (diff)
gspca - ov534: Fix ov772x
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 <jim@jtan.com> Acked-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/media/video/gspca/ov534.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/ov534.c b/drivers/media/video/gspca/ov534.c
index 19e0bc60de14..504f849fb31f 100644
--- 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 *gspca_dev, struct gspca_frame *frame,
__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