summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/pac7311.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-11-13 09:21:03 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 18:41:59 -0200
commit76dd272b56cd1c7fa013ef5d7eb28c4d319e322b (patch)
tree4cd4660a847d2c1fdd9104ce4cff92b647e09b15 /drivers/media/video/gspca/pac7311.c
parentd131c3c9e136cb5a817094c3dc4b7261b495cd6e (diff)
downloadlinux-76dd272b56cd1c7fa013ef5d7eb28c4d319e322b.tar.bz2
V4L/DVB (13453): gspca - all subdrivers: Remove the unused frame ptr from pkt_scan().
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/pac7311.c')
-rw-r--r--drivers/media/video/gspca/pac7311.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c
index 1a27da00ccc1..e5697a6345e8 100644
--- a/drivers/media/video/gspca/pac7311.c
+++ b/drivers/media/video/gspca/pac7311.c
@@ -653,7 +653,7 @@ static void pac_start_frame(struct gspca_dev *gspca_dev,
{
unsigned char tmpbuf[4];
- gspca_frame_add(gspca_dev, FIRST_PACKET, frame,
+ gspca_frame_add(gspca_dev, FIRST_PACKET,
pac_jpeg_header1, sizeof(pac_jpeg_header1));
tmpbuf[0] = lines >> 8;
@@ -661,25 +661,31 @@ static void pac_start_frame(struct gspca_dev *gspca_dev,
tmpbuf[2] = samples_per_line >> 8;
tmpbuf[3] = samples_per_line & 0xff;
- gspca_frame_add(gspca_dev, INTER_PACKET, frame,
+ gspca_frame_add(gspca_dev, INTER_PACKET,
tmpbuf, sizeof(tmpbuf));
- gspca_frame_add(gspca_dev, INTER_PACKET, frame,
+ gspca_frame_add(gspca_dev, INTER_PACKET,
pac_jpeg_header2, sizeof(pac_jpeg_header2));
}
/* this function is run at interrupt level */
static void sd_pkt_scan(struct gspca_dev *gspca_dev,
- struct gspca_frame *frame, /* target */
- __u8 *data, /* isoc packet */
+ u8 *data, /* isoc packet */
int len) /* iso packet length */
{
struct sd *sd = (struct sd *) gspca_dev;
unsigned char *sof;
+ struct gspca_frame *frame;
sof = pac_find_sof(&sd->sof_read, data, len);
if (sof) {
int n, lum_offset, footer_length;
+ frame = gspca_get_i_frame(gspca_dev);
+ if (frame == NULL) {
+ gspca_dev->last_packet_type = DISCARD_PACKET;
+ return;
+ }
+
/* 6 bytes after the FF D9 EOF marker a number of lumination
bytes are send corresponding to different parts of the
image, the 14th and 15th byte after the EOF seem to
@@ -693,12 +699,12 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
frame->data_end += n;
n = 0;
}
- frame = gspca_frame_add(gspca_dev, INTER_PACKET, frame,
+ gspca_frame_add(gspca_dev, INTER_PACKET,
data, n);
if (gspca_dev->last_packet_type != DISCARD_PACKET &&
frame->data_end[-2] == 0xff &&
frame->data_end[-1] == 0xd9)
- frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame,
+ gspca_frame_add(gspca_dev, LAST_PACKET,
NULL, 0);
n = sof - data;
@@ -717,7 +723,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
pac_start_frame(gspca_dev, frame,
gspca_dev->height, gspca_dev->width);
}
- gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len);
+ gspca_frame_add(gspca_dev, INTER_PACKET, data, len);
}
static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val)