diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2010-08-08 23:49:58 (GMT) |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-08-09 00:14:15 (GMT) |
commit | d9a145fb6e5f37b9903dea8371ab5c3e34e8e2d1 (patch) | |
tree | e2b4bb46fa00f0ad20447e40dba6fb21a4ae0815 /drivers/media/video/gspca/cpia1.c | |
parent | c9243f5bdd6637b2bb7dc254b54d9edf957ef17e (diff) | |
parent | 45d7f32c7a43cbb9592886d38190e379e2eb2226 (diff) | |
download | linux-fsl-qoriq-d9a145fb6e5f37b9903dea8371ab5c3e34e8e2d1.tar.xz |
Merge commit 'linus/master' into bkl/core
Merge reason: The staging tree has introduced the easycap
driver lately. We need the latest updates to pushdown the
bkl in its ioctl helper.
Diffstat (limited to 'drivers/media/video/gspca/cpia1.c')
-rw-r--r-- | drivers/media/video/gspca/cpia1.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/media/video/gspca/cpia1.c b/drivers/media/video/gspca/cpia1.c index 58b696f..3747a1d 100644 --- a/drivers/media/video/gspca/cpia1.c +++ b/drivers/media/video/gspca/cpia1.c @@ -1760,22 +1760,19 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, data[25] == sd->params.roi.colEnd && data[26] == sd->params.roi.rowStart && data[27] == sd->params.roi.rowEnd) { - struct gspca_frame *frame = gspca_get_i_frame(gspca_dev); + u8 *image; atomic_set(&sd->cam_exposure, data[39] * 2); atomic_set(&sd->fps, data[41]); - if (frame == NULL) { - gspca_dev->last_packet_type = DISCARD_PACKET; - return; - } - /* Check for proper EOF for last frame */ - if ((frame->data_end - frame->data) > 4 && - frame->data_end[-4] == 0xff && - frame->data_end[-3] == 0xff && - frame->data_end[-2] == 0xff && - frame->data_end[-1] == 0xff) + image = gspca_dev->image; + if (image != NULL && + gspca_dev->image_len > 4 && + image[gspca_dev->image_len - 4] == 0xff && + image[gspca_dev->image_len - 3] == 0xff && + image[gspca_dev->image_len - 2] == 0xff && + image[gspca_dev->image_len - 1] == 0xff) gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); |