diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/gspca/pac7311.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c index bed04cc9a584..3c5142852f27 100644 --- a/drivers/media/video/gspca/pac7311.c +++ b/drivers/media/video/gspca/pac7311.c | |||
@@ -70,7 +70,6 @@ struct sd { | |||
70 | #define SENSOR_PAC7311 1 | 70 | #define SENSOR_PAC7311 1 |
71 | 71 | ||
72 | u8 sof_read; | 72 | u8 sof_read; |
73 | u8 header_read; | ||
74 | u8 autogain_ignore_frames; | 73 | u8 autogain_ignore_frames; |
75 | 74 | ||
76 | atomic_t avg_lum; | 75 | atomic_t avg_lum; |
@@ -709,8 +708,6 @@ static const unsigned char pac7311_jpeg_header2[] = { | |||
709 | /* Include pac common sof detection functions */ | 708 | /* Include pac common sof detection functions */ |
710 | #include "pac_common.h" | 709 | #include "pac_common.h" |
711 | 710 | ||
712 | #define HEADER_LENGTH 2 | ||
713 | |||
714 | /* this function is run at interrupt level */ | 711 | /* this function is run at interrupt level */ |
715 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, | 712 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, |
716 | struct gspca_frame *frame, /* target */ | 713 | struct gspca_frame *frame, /* target */ |
@@ -784,22 +781,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, | |||
784 | gspca_frame_add(gspca_dev, INTER_PACKET, frame, tmpbuf, 4); | 781 | gspca_frame_add(gspca_dev, INTER_PACKET, frame, tmpbuf, 4); |
785 | gspca_frame_add(gspca_dev, INTER_PACKET, frame, | 782 | gspca_frame_add(gspca_dev, INTER_PACKET, frame, |
786 | pac7311_jpeg_header2, sizeof(pac7311_jpeg_header2)); | 783 | pac7311_jpeg_header2, sizeof(pac7311_jpeg_header2)); |
787 | |||
788 | sd->header_read = 0; | ||
789 | } | 784 | } |
790 | |||
791 | if (sd->header_read < HEADER_LENGTH) { | ||
792 | /* skip the variable part of the sof header */ | ||
793 | int needed = HEADER_LENGTH - sd->header_read; | ||
794 | if (len <= needed) { | ||
795 | sd->header_read += len; | ||
796 | return; | ||
797 | } | ||
798 | data += needed; | ||
799 | len -= needed; | ||
800 | sd->header_read = HEADER_LENGTH; | ||
801 | } | ||
802 | |||
803 | gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len); | 785 | gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len); |
804 | } | 786 | } |
805 | 787 | ||