]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (7544): em28xx: Fix timeout code
authorMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 13 Apr 2008 17:40:36 +0000 (14:40 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 24 Apr 2008 17:08:00 +0000 (14:08 -0300)
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/em28xx/em28xx-video.c

index ecc146bfc0225269e7f2144f4820b7a0487f662e..229d154424ff0a32b7de4fdf83879195e7791bbe 100644 (file)
@@ -452,6 +452,7 @@ static void em28xx_uninit_isoc(struct em28xx *dev)
 
        dev->isoc_ctl.num_bufs=0;
 
+       del_timer(&dev->vidq.timeout);
        em28xx_capture_start(dev, 0);
 }
 
@@ -575,9 +576,8 @@ static void em28xx_vid_timeout(unsigned long data)
        unsigned long flags;
 
        spin_lock_irqsave(&dev->slock,flags);
-       while (!list_empty(&vidq->active)) {
-               buf = list_entry(vidq->active.next, struct em28xx_buffer,
-                                                                vb.queue);
+
+       list_for_each_entry(buf, vidq->active.next, vb.queue) {
                list_del(&buf->vb.queue);
                buf->vb.state = VIDEOBUF_ERROR;
                wake_up(&buf->vb.done);