]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (9094): gspca: Frame counter in ALi m5602.
authorErik Andren <erik.andren@gmail.com>
Fri, 3 Oct 2008 12:28:45 +0000 (09:28 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 12 Oct 2008 11:37:13 +0000 (09:37 -0200)
Signed-off-by: Erik Andren <erik.andren@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/m5602/m5602_core.c

index ac105ef4aa6af92beacb785fd793e8e7f8069086..58ebffdcaae5c30944f3765eaffea2dcd67914c4 100644 (file)
@@ -146,6 +146,7 @@ int m5602_probe_sensor(struct sd *sd)
                return 0;
        }
 
+
        /* More sensor probe function goes here */
        info("Failed to find a sensor");
        sd->sensor = NULL;
@@ -202,12 +203,13 @@ void m5602_urb_complete(struct gspca_dev *gspca_dev, struct gspca_frame *frame,
                /* Complete the last frame (if any) */
                frame = gspca_frame_add(gspca_dev, LAST_PACKET,
                                        frame, data, 0);
+               sd->frame_count++;
 
                /* Create a new frame */
                gspca_frame_add(gspca_dev, FIRST_PACKET, frame, data, len);
 
-               PDEBUG(DBG_V4L2, "Starting new frame. First urb contained %d",
-                      len);
+               PDEBUG(DBG_V4L2, "Starting new frame %d",
+                      sd->frame_count);
 
        } else {
                int cur_frame_len = frame->data_end - frame->data;
@@ -217,8 +219,8 @@ void m5602_urb_complete(struct gspca_dev *gspca_dev, struct gspca_frame *frame,
                len -= 4;
 
                if (cur_frame_len + len <= frame->v4l2_buf.length) {
-                       PDEBUG(DBG_DATA, "Continuing frame copying %d bytes",
-                              len);
+                       PDEBUG(DBG_DATA, "Continuing frame %d copying %d bytes",
+                              sd->frame_count, len);
 
                        gspca_frame_add(gspca_dev, INTER_PACKET, frame,
                                        data, len);