summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/spca561.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-01-16 12:57:28 +0100
committerJean-Francois Moine <moinejf@free.fr>2009-01-16 12:57:28 +0100
commit3f72fef8e0c14f63c1c530cd571a89491f997650 (patch)
tree45c08ef3b49343c29c9d1755f6788d820ee4d6a7 /linux/drivers/media/video/gspca/spca561.c
parentf849265ace360a44941e106a3a0b6072f422df40 (diff)
downloadmediapointer-dvb-s2-3f72fef8e0c14f63c1c530cd571a89491f997650.tar.gz
mediapointer-dvb-s2-3f72fef8e0c14f63c1c530cd571a89491f997650.tar.bz2
gspca - spca561: Optimize the isoc scanning function.
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca/spca561.c')
-rw-r--r--linux/drivers/media/video/gspca/spca561.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/linux/drivers/media/video/gspca/spca561.c b/linux/drivers/media/video/gspca/spca561.c
index b991ddde5..bcc8e863d 100644
--- a/linux/drivers/media/video/gspca/spca561.c
+++ b/linux/drivers/media/video/gspca/spca561.c
@@ -141,7 +141,6 @@ static const struct v4l2_pix_format sif_072a_mode[] = {
#define SPCA561_OFFSET_WIN1GBAVE 14
#define SPCA561_OFFSET_FREQ 15
#define SPCA561_OFFSET_VSYNC 16
-#define SPCA561_OFFSET_DATA 1
#define SPCA561_INDEX_I2C_BASE 0x8800
#define SPCA561_SNAPBIT 0x20
#define SPCA561_SNAPCTRL 0x40
@@ -873,12 +872,11 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
{
struct sd *sd = (struct sd *) gspca_dev;
- switch (data[0]) { /* sequence number */
+ len--;
+ switch (*data++) { /* sequence number */
case 0: /* start of frame */
frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame,
data, 0);
- data += SPCA561_OFFSET_DATA;
- len -= SPCA561_OFFSET_DATA;
if (data[1] & 0x10) {
/* compressed bayer */
gspca_frame_add(gspca_dev, FIRST_PACKET,
@@ -899,8 +897,6 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
case 0xff: /* drop (empty mpackets) */
return;
}
- data++;
- len--;
gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len);
}