aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/pac7311.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-11-13 07:21:03 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:41:59 -0500
commit76dd272b56cd1c7fa013ef5d7eb28c4d319e322b (patch)
tree4cd4660a847d2c1fdd9104ce4cff92b647e09b15 /drivers/media/video/gspca/pac7311.c
parentd131c3c9e136cb5a817094c3dc4b7261b495cd6e (diff)
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,
653{ 653{
654 unsigned char tmpbuf[4]; 654 unsigned char tmpbuf[4];
655 655
656 gspca_frame_add(gspca_dev, FIRST_PACKET, frame, 656 gspca_frame_add(gspca_dev, FIRST_PACKET,
657 pac_jpeg_header1, sizeof(pac_jpeg_header1)); 657 pac_jpeg_header1, sizeof(pac_jpeg_header1));
658 658
659 tmpbuf[0] = lines >> 8; 659 tmpbuf[0] = lines >> 8;
@@ -661,25 +661,31 @@ static void pac_start_frame(struct gspca_dev *gspca_dev,
661 tmpbuf[2] = samples_per_line >> 8; 661 tmpbuf[2] = samples_per_line >> 8;
662 tmpbuf[3] = samples_per_line & 0xff; 662 tmpbuf[3] = samples_per_line & 0xff;
663 663
664 gspca_frame_add(gspca_dev, INTER_PACKET, frame, 664 gspca_frame_add(gspca_dev, INTER_PACKET,
665 tmpbuf, sizeof(tmpbuf)); 665 tmpbuf, sizeof(tmpbuf));
666 gspca_frame_add(gspca_dev, INTER_PACKET, frame, 666 gspca_frame_add(gspca_dev, INTER_PACKET,
667 pac_jpeg_header2, sizeof(pac_jpeg_header2)); 667 pac_jpeg_header2, sizeof(pac_jpeg_header2));
668} 668}
669 669
670/* this function is run at interrupt level */ 670/* this function is run at interrupt level */
671static void sd_pkt_scan(struct gspca_dev *gspca_dev, 671static void sd_pkt_scan(struct gspca_dev *gspca_dev,
672 struct gspca_frame *frame, /* target */ 672 u8 *data, /* isoc packet */
673 __u8 *data, /* isoc packet */
674 int len) /* iso packet length */ 673 int len) /* iso packet length */
675{ 674{
676 struct sd *sd = (struct sd *) gspca_dev; 675 struct sd *sd = (struct sd *) gspca_dev;
677 unsigned char *sof; 676 unsigned char *sof;
677 struct gspca_frame *frame;
678 678
679 sof = pac_find_sof(&sd->sof_read, data, len); 679 sof = pac_find_sof(&sd->sof_read, data, len);
680 if (sof) { 680 if (sof) {
681 int n, lum_offset, footer_length; 681 int n, lum_offset, footer_length;
682 682
683 frame = gspca_get_i_frame(gspca_dev);
684 if (frame == NULL) {
685 gspca_dev->last_packet_type = DISCARD_PACKET;
686 return;
687 }
688
683 /* 6 bytes after the FF D9 EOF marker a number of lumination 689 /* 6 bytes after the FF D9 EOF marker a number of lumination
684 bytes are send corresponding to different parts of the 690 bytes are send corresponding to different parts of the
685 image, the 14th and 15th byte after the EOF seem to 691 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,
693 frame->data_end += n; 699 frame->data_end += n;
694 n = 0; 700 n = 0;
695 } 701 }
696 frame = gspca_frame_add(gspca_dev, INTER_PACKET, frame, 702 gspca_frame_add(gspca_dev, INTER_PACKET,
697 data, n); 703 data, n);
698 if (gspca_dev->last_packet_type != DISCARD_PACKET && 704 if (gspca_dev->last_packet_type != DISCARD_PACKET &&
699 frame->data_end[-2] == 0xff && 705 frame->data_end[-2] == 0xff &&
700 frame->data_end[-1] == 0xd9) 706 frame->data_end[-1] == 0xd9)
701 frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame, 707 gspca_frame_add(gspca_dev, LAST_PACKET,
702 NULL, 0); 708 NULL, 0);
703 709
704 n = sof - data; 710 n = sof - data;
@@ -717,7 +723,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
717 pac_start_frame(gspca_dev, frame, 723 pac_start_frame(gspca_dev, frame,
718 gspca_dev->height, gspca_dev->width); 724 gspca_dev->height, gspca_dev->width);
719 } 725 }
720 gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len); 726 gspca_frame_add(gspca_dev, INTER_PACKET, data, len);
721} 727}
722 728
723static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val) 729static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val)