aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/gspca/sq905c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/sq905c.c')
-rw-r--r--drivers/media/video/gspca/sq905c.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/gspca/sq905c.c b/drivers/media/video/gspca/sq905c.c
index 81020f6f739..d70b156872d 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)
{
struct sd *dev = container_of(work, struct sd, work_struct);
struct gspca_dev *gspca_dev = &dev->gspca_dev;
- struct gspca_frame *frame;
int bytes_left; /* bytes remaining in current frame. */
int data_len; /* size to use for the next read. */
int act_len;
@@ -146,10 +145,8 @@ static void sq905c_dostream(struct work_struct *work)
PDEBUG(D_STREAM, "bytes_left = 0x%x", bytes_left);
/* We keep the header. It has other information, too. */
packet_type = FIRST_PACKET;
- frame = gspca_get_i_frame(gspca_dev);
- if (frame)
- gspca_frame_add(gspca_dev, packet_type,
- frame, buffer, FRAME_HEADER_LEN);
+ gspca_frame_add(gspca_dev, packet_type,
+ buffer, FRAME_HEADER_LEN);
while (bytes_left > 0 && gspca_dev->present) {
data_len = bytes_left > SQ905C_MAX_TRANSFER ?
SQ905C_MAX_TRANSFER : bytes_left;
@@ -167,9 +164,8 @@ static void sq905c_dostream(struct work_struct *work)
packet_type = LAST_PACKET;
else
packet_type = INTER_PACKET;
- if (frame)
- gspca_frame_add(gspca_dev, packet_type,
- frame, buffer, data_len);
+ gspca_frame_add(gspca_dev, packet_type,
+ buffer, data_len);
}
}
quit_stream: