aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/cpia1.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 13:38:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-04 13:38:08 -0400
commitf63b759c44b0561c76a67894c734157df3313b42 (patch)
tree4e9638f6c1aa5c0faa62ad4213282cc7cb39772a /drivers/media/video/gspca/cpia1.c
parent4a35cee066df1b1958e25e71595b3845d06b192e (diff)
parent844a9e93d7fcd910cd94f6eb262e2cc43cacbe56 (diff)
Merge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (243 commits) V4L/DVB: sms: Convert IR support to use the Remote Controller core V4L/DVB: sms: properly initialize IR phys and IR name V4L/DVB: standardize names at rc-dib0700 tables V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick V4L/DVB: dib0700: Fix RC protocol logic to properly handle NEC/NECx and RC-5 V4L/DVB: dib0700: properly implement IR change_protocol V4L/DVB: dib0700: break keytable into NEC and RC-5 variants V4L/DVB: dib0700: avoid bad repeat V4L/DVB: Port dib0700 to rc-core V4L/DVB: Add a keymap file with dib0700 table V4L/DVB: dvb-usb: add support for rc-core mode V4L/DVB: dvb-usb: prepare drivers for using rc-core V4L/DVB: dvb-usb: get rid of struct dvb_usb_rc_key V4L/DVB: rj54n1cb0c: fix a comment in the driver V4L/DVB: V4L2: sh_vou: VOU does support the full PAL resolution too V4L/DVB: V4L2: sh_mobile_camera_ceu: add support for CSI2 V4L/DVB: V4L2: soc-camera: add a MIPI CSI-2 driver for SH-Mobile platforms V4L/DVB: V4L2: soc-camera: export soc-camera bus type for notifications V4L/DVB: V4L2: mediabus: add 12-bit Bayer and YUV420 pixel formats V4L/DVB: mediabus: fix ambiguous pixel code names ...
Diffstat (limited to 'drivers/media/video/gspca/cpia1.c')
-rw-r--r--drivers/media/video/gspca/cpia1.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/media/video/gspca/cpia1.c b/drivers/media/video/gspca/cpia1.c
index 58b696f455be..3747a1dcff54 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,
1760 data[25] == sd->params.roi.colEnd && 1760 data[25] == sd->params.roi.colEnd &&
1761 data[26] == sd->params.roi.rowStart && 1761 data[26] == sd->params.roi.rowStart &&
1762 data[27] == sd->params.roi.rowEnd) { 1762 data[27] == sd->params.roi.rowEnd) {
1763 struct gspca_frame *frame = gspca_get_i_frame(gspca_dev); 1763 u8 *image;
1764 1764
1765 atomic_set(&sd->cam_exposure, data[39] * 2); 1765 atomic_set(&sd->cam_exposure, data[39] * 2);
1766 atomic_set(&sd->fps, data[41]); 1766 atomic_set(&sd->fps, data[41]);
1767 1767
1768 if (frame == NULL) {
1769 gspca_dev->last_packet_type = DISCARD_PACKET;
1770 return;
1771 }
1772
1773 /* Check for proper EOF for last frame */ 1768 /* Check for proper EOF for last frame */
1774 if ((frame->data_end - frame->data) > 4 && 1769 image = gspca_dev->image;
1775 frame->data_end[-4] == 0xff && 1770 if (image != NULL &&
1776 frame->data_end[-3] == 0xff && 1771 gspca_dev->image_len > 4 &&
1777 frame->data_end[-2] == 0xff && 1772 image[gspca_dev->image_len - 4] == 0xff &&
1778 frame->data_end[-1] == 0xff) 1773 image[gspca_dev->image_len - 3] == 0xff &&
1774 image[gspca_dev->image_len - 2] == 0xff &&
1775 image[gspca_dev->image_len - 1] == 0xff)
1779 gspca_frame_add(gspca_dev, LAST_PACKET, 1776 gspca_frame_add(gspca_dev, LAST_PACKET,
1780 NULL, 0); 1777 NULL, 0);
1781 1778