diff options
author | Brandon Philips <brandon@ifup.org> | 2007-11-06 18:02:36 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:02:11 -0500 |
commit | 0fc0686e64d21a6abded96af2b1a895dfa8b2530 (patch) | |
tree | 6c7a696c13bccb98e9b4a95e995b7992605ed419 /drivers/media/video/vivi.c | |
parent | 1414becf15da1701b0c45e9c82b1f120cb676a36 (diff) |
V4L/DVB (6600): V4L: videobuf: don't chew up namespace STATE_.*, convert to VIDEOBUF_
s/STATE_NEEDS_INIT/VIDEOBUF_NEEDS_INIT/g
s/STATE_PREPARED/VIDEOBUF_PREPARED/g
s/STATE_QUEUED/VIDEOBUF_QUEUED/g
s/STATE_ACTIVE/VIDEOBUF_ACTIVE/g
s/STATE_DONE/VIDEOBUF_DONE/g
s/STATE_ERROR/VIDEOBUF_ERROR/g
s/STATE_IDLE/VIDEOBUF_IDLE/g
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/vivi.c')
-rw-r--r-- | drivers/media/video/vivi.c | 24 |
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 | } |