diff options
Diffstat (limited to 'drivers/media/video/gspca/sq905c.c')
-rw-r--r-- | drivers/media/video/gspca/sq905c.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/gspca/sq905c.c b/drivers/media/video/gspca/sq905c.c index 81020f6f739e..d70b156872d6 100644 --- a/drivers/media/video/gspca/sq905c.c +++ b/drivers/media/video/gspca/sq905c.c | |||
@@ -115,7 +115,6 @@ static void sq905c_dostream(struct work_struct *work) | |||
115 | { | 115 | { |
116 | struct sd *dev = container_of(work, struct sd, work_struct); | 116 | struct sd *dev = container_of(work, struct sd, work_struct); |
117 | struct gspca_dev *gspca_dev = &dev->gspca_dev; | 117 | struct gspca_dev *gspca_dev = &dev->gspca_dev; |
118 | struct gspca_frame *frame; | ||
119 | int bytes_left; /* bytes remaining in current frame. */ | 118 | int bytes_left; /* bytes remaining in current frame. */ |
120 | int data_len; /* size to use for the next read. */ | 119 | int data_len; /* size to use for the next read. */ |
121 | int act_len; | 120 | int act_len; |
@@ -146,10 +145,8 @@ static void sq905c_dostream(struct work_struct *work) | |||
146 | PDEBUG(D_STREAM, "bytes_left = 0x%x", bytes_left); | 145 | PDEBUG(D_STREAM, "bytes_left = 0x%x", bytes_left); |
147 | /* We keep the header. It has other information, too. */ | 146 | /* We keep the header. It has other information, too. */ |
148 | packet_type = FIRST_PACKET; | 147 | packet_type = FIRST_PACKET; |
149 | frame = gspca_get_i_frame(gspca_dev); | 148 | gspca_frame_add(gspca_dev, packet_type, |
150 | if (frame) | 149 | buffer, FRAME_HEADER_LEN); |
151 | gspca_frame_add(gspca_dev, packet_type, | ||
152 | frame, buffer, FRAME_HEADER_LEN); | ||
153 | while (bytes_left > 0 && gspca_dev->present) { | 150 | while (bytes_left > 0 && gspca_dev->present) { |
154 | data_len = bytes_left > SQ905C_MAX_TRANSFER ? | 151 | data_len = bytes_left > SQ905C_MAX_TRANSFER ? |
155 | SQ905C_MAX_TRANSFER : bytes_left; | 152 | SQ905C_MAX_TRANSFER : bytes_left; |
@@ -167,9 +164,8 @@ static void sq905c_dostream(struct work_struct *work) | |||
167 | packet_type = LAST_PACKET; | 164 | packet_type = LAST_PACKET; |
168 | else | 165 | else |
169 | packet_type = INTER_PACKET; | 166 | packet_type = INTER_PACKET; |
170 | if (frame) | 167 | gspca_frame_add(gspca_dev, packet_type, |
171 | gspca_frame_add(gspca_dev, packet_type, | 168 | buffer, data_len); |
172 | frame, buffer, data_len); | ||
173 | } | 169 | } |
174 | } | 170 | } |
175 | quit_stream: | 171 | quit_stream: |