aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/vivi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/vivi.c')
-rw-r--r--drivers/media/video/vivi.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
index 9b54ff9d2e36..fe9784a0cc21 100644
--- a/drivers/media/video/vivi.c
+++ b/drivers/media/video/vivi.c
@@ -370,7 +370,7 @@ static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf)
370 (unsigned long)tmpbuf,pos); 370 (unsigned long)tmpbuf,pos);
371 371
372 /* Advice that buffer was filled */ 372 /* Advice that buffer was filled */
373 buf->vb.state = STATE_DONE; 373 buf->vb.state = VIDEOBUF_DONE;
374 buf->vb.field_count++; 374 buf->vb.field_count++;
375 do_gettimeofday(&ts); 375 do_gettimeofday(&ts);
376 buf->vb.ts = ts; 376 buf->vb.ts = ts;
@@ -522,7 +522,7 @@ static int restart_video_queue(struct vivi_dmaqueue *dma_q)
522 /* cancel all outstanding capture / vbi requests */ 522 /* cancel all outstanding capture / vbi requests */
523 list_for_each_entry_safe(buf, prev, &dma_q->active, vb.queue) { 523 list_for_each_entry_safe(buf, prev, &dma_q->active, vb.queue) {
524 list_del(&buf->vb.queue); 524 list_del(&buf->vb.queue);
525 buf->vb.state = STATE_ERROR; 525 buf->vb.state = VIDEOBUF_ERROR;
526 wake_up(&buf->vb.done); 526 wake_up(&buf->vb.done);
527 } 527 }
528 mod_timer(&dma_q->timeout, jiffies+BUFFER_TIMEOUT); 528 mod_timer(&dma_q->timeout, jiffies+BUFFER_TIMEOUT);
@@ -543,7 +543,7 @@ static int restart_video_queue(struct vivi_dmaqueue *dma_q)
543 vivi_stop_thread(dma_q); 543 vivi_stop_thread(dma_q);
544 vivi_start_thread(dma_q); 544 vivi_start_thread(dma_q);
545 545
546 buf->vb.state = STATE_ACTIVE; 546 buf->vb.state = VIDEOBUF_ACTIVE;
547 mod_timer(&dma_q->timeout, jiffies+BUFFER_TIMEOUT); 547 mod_timer(&dma_q->timeout, jiffies+BUFFER_TIMEOUT);
548 dprintk(2,"[%p/%d] restart_queue - first active\n", 548 dprintk(2,"[%p/%d] restart_queue - first active\n",
549 buf,buf->vb.i); 549 buf,buf->vb.i);
@@ -553,7 +553,7 @@ static int restart_video_queue(struct vivi_dmaqueue *dma_q)
553 prev->fmt == buf->fmt) { 553 prev->fmt == buf->fmt) {
554 list_del(&buf->vb.queue); 554 list_del(&buf->vb.queue);
555 list_add_tail(&buf->vb.queue,&dma_q->active); 555 list_add_tail(&buf->vb.queue,&dma_q->active);
556 buf->vb.state = STATE_ACTIVE; 556 buf->vb.state = VIDEOBUF_ACTIVE;
557 dprintk(2,"[%p/%d] restart_queue - move to active\n", 557 dprintk(2,"[%p/%d] restart_queue - move to active\n",
558 buf,buf->vb.i); 558 buf,buf->vb.i);
559 } else { 559 } else {
@@ -572,7 +572,7 @@ static void vivi_vid_timeout(unsigned long data)
572 while (!list_empty(&vidq->active)) { 572 while (!list_empty(&vidq->active)) {
573 buf = list_entry(vidq->active.next, struct vivi_buffer, vb.queue); 573 buf = list_entry(vidq->active.next, struct vivi_buffer, vb.queue);
574 list_del(&buf->vb.queue); 574 list_del(&buf->vb.queue);
575 buf->vb.state = STATE_ERROR; 575 buf->vb.state = VIDEOBUF_ERROR;
576 wake_up(&buf->vb.done); 576 wake_up(&buf->vb.done);
577 printk("vivi/0: [%p/%d] timeout\n", buf, buf->vb.i); 577 printk("vivi/0: [%p/%d] timeout\n", buf, buf->vb.i);
578 } 578 }
@@ -610,7 +610,7 @@ static void free_buffer(struct videobuf_queue *vq, struct vivi_buffer *buf)
610 610
611 videobuf_waiton(&buf->vb,0,0); 611 videobuf_waiton(&buf->vb,0,0);
612 videobuf_vmalloc_free(&buf->vb); 612 videobuf_vmalloc_free(&buf->vb);
613 buf->vb.state = STATE_NEEDS_INIT; 613 buf->vb.state = VIDEOBUF_NEEDS_INIT;
614} 614}
615 615
616#define norm_maxw() 1024 616#define norm_maxw() 1024
@@ -644,12 +644,12 @@ buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb,
644 init_buffer = 1; 644 init_buffer = 1;
645 } 645 }
646 646
647 if (STATE_NEEDS_INIT == buf->vb.state) { 647 if (VIDEOBUF_NEEDS_INIT == buf->vb.state) {
648 if (0 != (rc = videobuf_iolock(vq,&buf->vb,NULL))) 648 if (0 != (rc = videobuf_iolock(vq,&buf->vb,NULL)))
649 goto fail; 649 goto fail;
650 } 650 }
651 651
652 buf->vb.state = STATE_PREPARED; 652 buf->vb.state = VIDEOBUF_PREPARED;
653 653
654 return 0; 654 return 0;
655 655
@@ -670,13 +670,13 @@ buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb)
670 if (!list_empty(&vidq->queued)) { 670 if (!list_empty(&vidq->queued)) {
671 dprintk(1,"adding vb queue=0x%08lx\n",(unsigned long)&buf->vb.queue); 671 dprintk(1,"adding vb queue=0x%08lx\n",(unsigned long)&buf->vb.queue);
672 list_add_tail(&buf->vb.queue,&vidq->queued); 672 list_add_tail(&buf->vb.queue,&vidq->queued);
673 buf->vb.state = STATE_QUEUED; 673 buf->vb.state = VIDEOBUF_QUEUED;
674 dprintk(2,"[%p/%d] buffer_queue - append to queued\n", 674 dprintk(2,"[%p/%d] buffer_queue - append to queued\n",
675 buf, buf->vb.i); 675 buf, buf->vb.i);
676 } else if (list_empty(&vidq->active)) { 676 } else if (list_empty(&vidq->active)) {
677 list_add_tail(&buf->vb.queue,&vidq->active); 677 list_add_tail(&buf->vb.queue,&vidq->active);
678 678
679 buf->vb.state = STATE_ACTIVE; 679 buf->vb.state = VIDEOBUF_ACTIVE;
680 mod_timer(&vidq->timeout, jiffies+BUFFER_TIMEOUT); 680 mod_timer(&vidq->timeout, jiffies+BUFFER_TIMEOUT);
681 dprintk(2,"[%p/%d] buffer_queue - first active\n", 681 dprintk(2,"[%p/%d] buffer_queue - first active\n",
682 buf, buf->vb.i); 682 buf, buf->vb.i);
@@ -688,13 +688,13 @@ buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb)
688 prev->vb.height == buf->vb.height && 688 prev->vb.height == buf->vb.height &&
689 prev->fmt == buf->fmt) { 689 prev->fmt == buf->fmt) {
690 list_add_tail(&buf->vb.queue,&vidq->active); 690 list_add_tail(&buf->vb.queue,&vidq->active);
691 buf->vb.state = STATE_ACTIVE; 691 buf->vb.state = VIDEOBUF_ACTIVE;
692 dprintk(2,"[%p/%d] buffer_queue - append to active\n", 692 dprintk(2,"[%p/%d] buffer_queue - append to active\n",
693 buf, buf->vb.i); 693 buf, buf->vb.i);
694 694
695 } else { 695 } else {
696 list_add_tail(&buf->vb.queue,&vidq->queued); 696 list_add_tail(&buf->vb.queue,&vidq->queued);
697 buf->vb.state = STATE_QUEUED; 697 buf->vb.state = VIDEOBUF_QUEUED;
698 dprintk(2,"[%p/%d] buffer_queue - first queued\n", 698 dprintk(2,"[%p/%d] buffer_queue - first queued\n",
699 buf, buf->vb.i); 699 buf, buf->vb.i);
700 } 700 }