diff options
-rw-r--r-- | drivers/media/video/vivi.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index 119cfd5ce312..178441922738 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c | |||
@@ -471,11 +471,12 @@ static void vivi_thread_tick(struct vivi_dmaqueue *dma_q) | |||
471 | 471 | ||
472 | /* Fill buffer */ | 472 | /* Fill buffer */ |
473 | vivi_fillbuff(dev,buf); | 473 | vivi_fillbuff(dev,buf); |
474 | } | 474 | |
475 | if (list_empty(&dma_q->active)) { | 475 | if (list_empty(&dma_q->active)) { |
476 | del_timer(&dma_q->timeout); | 476 | del_timer(&dma_q->timeout); |
477 | } else { | 477 | } else { |
478 | mod_timer(&dma_q->timeout, jiffies+BUFFER_TIMEOUT); | 478 | mod_timer(&dma_q->timeout, jiffies+BUFFER_TIMEOUT); |
479 | } | ||
479 | } | 480 | } |
480 | if (bc != 1) | 481 | if (bc != 1) |
481 | dprintk(1,"%s: %d buffers handled (should be 1)\n",__FUNCTION__,bc); | 482 | dprintk(1,"%s: %d buffers handled (should be 1)\n",__FUNCTION__,bc); |
@@ -522,6 +523,8 @@ static int vivi_thread(void *data) | |||
522 | 523 | ||
523 | dprintk(1,"thread started\n"); | 524 | dprintk(1,"thread started\n"); |
524 | 525 | ||
526 | mod_timer(&dma_q->timeout, jiffies+BUFFER_TIMEOUT); | ||
527 | |||
525 | for (;;) { | 528 | for (;;) { |
526 | vivi_sleep(dma_q); | 529 | vivi_sleep(dma_q); |
527 | 530 | ||
@@ -545,6 +548,9 @@ static int vivi_start_thread(struct vivi_dmaqueue *dma_q) | |||
545 | printk(KERN_ERR "vivi: kernel_thread() failed\n"); | 548 | printk(KERN_ERR "vivi: kernel_thread() failed\n"); |
546 | return PTR_ERR(dma_q->kthread); | 549 | return PTR_ERR(dma_q->kthread); |
547 | } | 550 | } |
551 | /* Wakes thread */ | ||
552 | wake_up_interruptible(&dma_q->wq); | ||
553 | |||
548 | dprintk(1,"returning from %s\n",__FUNCTION__); | 554 | dprintk(1,"returning from %s\n",__FUNCTION__); |
549 | return 0; | 555 | return 0; |
550 | } | 556 | } |