aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/pac7302.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/pac7302.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/pac7302.c')
-rw-r--r--drivers/media/video/gspca/pac7302.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/media/video/gspca/pac7302.c b/drivers/media/video/gspca/pac7302.c
index e0fd767984b3..74acceea8094 100644
--- a/drivers/media/video/gspca/pac7302.c
+++ b/drivers/media/video/gspca/pac7302.c
@@ -855,7 +855,7 @@ static void pac_start_frame(struct gspca_dev *gspca_dev,
855{ 855{
856 unsigned char tmpbuf[4]; 856 unsigned char tmpbuf[4];
857 857
858 gspca_frame_add(gspca_dev, FIRST_PACKET, frame, 858 gspca_frame_add(gspca_dev, FIRST_PACKET,
859 pac_jpeg_header1, sizeof(pac_jpeg_header1)); 859 pac_jpeg_header1, sizeof(pac_jpeg_header1));
860 860
861 tmpbuf[0] = lines >> 8; 861 tmpbuf[0] = lines >> 8;
@@ -863,25 +863,31 @@ static void pac_start_frame(struct gspca_dev *gspca_dev,
863 tmpbuf[2] = samples_per_line >> 8; 863 tmpbuf[2] = samples_per_line >> 8;
864 tmpbuf[3] = samples_per_line & 0xff; 864 tmpbuf[3] = samples_per_line & 0xff;
865 865
866 gspca_frame_add(gspca_dev, INTER_PACKET, frame, 866 gspca_frame_add(gspca_dev, INTER_PACKET,
867 tmpbuf, sizeof(tmpbuf)); 867 tmpbuf, sizeof(tmpbuf));
868 gspca_frame_add(gspca_dev, INTER_PACKET, frame, 868 gspca_frame_add(gspca_dev, INTER_PACKET,
869 pac_jpeg_header2, sizeof(pac_jpeg_header2)); 869 pac_jpeg_header2, sizeof(pac_jpeg_header2));
870} 870}
871 871
872/* this function is run at interrupt level */ 872/* this function is run at interrupt level */
873static void sd_pkt_scan(struct gspca_dev *gspca_dev, 873static void sd_pkt_scan(struct gspca_dev *gspca_dev,
874 struct gspca_frame *frame, /* target */ 874 u8 *data, /* isoc packet */
875 __u8 *data, /* isoc packet */
876 int len) /* iso packet length */ 875 int len) /* iso packet length */
877{ 876{
878 struct sd *sd = (struct sd *) gspca_dev; 877 struct sd *sd = (struct sd *) gspca_dev;
878 struct gspca_frame *frame;
879 unsigned char *sof; 879 unsigned char *sof;
880 880
881 sof = pac_find_sof(&sd->sof_read, data, len); 881 sof = pac_find_sof(&sd->sof_read, data, len);
882 if (sof) { 882 if (sof) {
883 int n, lum_offset, footer_length; 883 int n, lum_offset, footer_length;
884 884
885 frame = gspca_get_i_frame(gspca_dev);
886 if (frame == NULL) {
887 gspca_dev->last_packet_type = DISCARD_PACKET;
888 return;
889 }
890
885 /* 6 bytes after the FF D9 EOF marker a number of lumination 891 /* 6 bytes after the FF D9 EOF marker a number of lumination
886 bytes are send corresponding to different parts of the 892 bytes are send corresponding to different parts of the
887 image, the 14th and 15th byte after the EOF seem to 893 image, the 14th and 15th byte after the EOF seem to
@@ -895,12 +901,12 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
895 frame->data_end += n; 901 frame->data_end += n;
896 n = 0; 902 n = 0;
897 } 903 }
898 frame = gspca_frame_add(gspca_dev, INTER_PACKET, frame, 904 gspca_frame_add(gspca_dev, INTER_PACKET,
899 data, n); 905 data, n);
900 if (gspca_dev->last_packet_type != DISCARD_PACKET && 906 if (gspca_dev->last_packet_type != DISCARD_PACKET &&
901 frame->data_end[-2] == 0xff && 907 frame->data_end[-2] == 0xff &&
902 frame->data_end[-1] == 0xd9) 908 frame->data_end[-1] == 0xd9)
903 frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame, 909 gspca_frame_add(gspca_dev, LAST_PACKET,
904 NULL, 0); 910 NULL, 0);
905 911
906 n = sof - data; 912 n = sof - data;
@@ -920,7 +926,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
920 pac_start_frame(gspca_dev, frame, 926 pac_start_frame(gspca_dev, frame,
921 gspca_dev->width, gspca_dev->height); 927 gspca_dev->width, gspca_dev->height);
922 } 928 }
923 gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len); 929 gspca_frame_add(gspca_dev, INTER_PACKET, data, len);
924} 930}
925 931
926static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val) 932static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val)