aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-01-16 06:57:28 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:32 -0400
commit576ed7b5696b9435e8e6a6ec0c57da1f19c7e469 (patch)
treebc4bb85ea65497f3b1208a180f496762fd56e4b1 /drivers
parentd661e62205498ce6518b9859bc30444e59737d8b (diff)
V4L/DVB (10367): gspca - spca561: Optimize the isoc scanning function.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/gspca/spca561.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c
index 173c0c43fd1f..386aaec3e6e1 100644
--- a/drivers/media/video/gspca/spca561.c
+++ b/drivers/media/video/gspca/spca561.c
@@ -141,7 +141,6 @@ static const struct v4l2_pix_format sif_072a_mode[] = {
141#define SPCA561_OFFSET_WIN1GBAVE 14 141#define SPCA561_OFFSET_WIN1GBAVE 14
142#define SPCA561_OFFSET_FREQ 15 142#define SPCA561_OFFSET_FREQ 15
143#define SPCA561_OFFSET_VSYNC 16 143#define SPCA561_OFFSET_VSYNC 16
144#define SPCA561_OFFSET_DATA 1
145#define SPCA561_INDEX_I2C_BASE 0x8800 144#define SPCA561_INDEX_I2C_BASE 0x8800
146#define SPCA561_SNAPBIT 0x20 145#define SPCA561_SNAPBIT 0x20
147#define SPCA561_SNAPCTRL 0x40 146#define SPCA561_SNAPCTRL 0x40
@@ -866,12 +865,11 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
866{ 865{
867 struct sd *sd = (struct sd *) gspca_dev; 866 struct sd *sd = (struct sd *) gspca_dev;
868 867
869 switch (data[0]) { /* sequence number */ 868 len--;
869 switch (*data++) { /* sequence number */
870 case 0: /* start of frame */ 870 case 0: /* start of frame */
871 frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame, 871 frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame,
872 data, 0); 872 data, 0);
873 data += SPCA561_OFFSET_DATA;
874 len -= SPCA561_OFFSET_DATA;
875 if (data[1] & 0x10) { 873 if (data[1] & 0x10) {
876 /* compressed bayer */ 874 /* compressed bayer */
877 gspca_frame_add(gspca_dev, FIRST_PACKET, 875 gspca_frame_add(gspca_dev, FIRST_PACKET,
@@ -892,8 +890,6 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
892 case 0xff: /* drop (empty mpackets) */ 890 case 0xff: /* drop (empty mpackets) */
893 return; 891 return;
894 } 892 }
895 data++;
896 len--;
897 gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len); 893 gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len);
898} 894}
899 895