aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-video.c
diff options
context:
space:
mode:
authorBrandon Philips <brandon@ifup.org>2007-11-06 18:02:36 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:02:11 -0500
commit0fc0686e64d21a6abded96af2b1a895dfa8b2530 (patch)
tree6c7a696c13bccb98e9b4a95e995b7992605ed419 /drivers/media/video/cx88/cx88-video.c
parent1414becf15da1701b0c45e9c82b1f120cb676a36 (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/cx88/cx88-video.c')
-rw-r--r--drivers/media/video/cx88/cx88-video.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index c84dafbdb991..6d5ea8ce9830 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -486,7 +486,7 @@ static int restart_video_queue(struct cx8800_dev *dev,
486 if (NULL == prev) { 486 if (NULL == prev) {
487 list_move_tail(&buf->vb.queue, &q->active); 487 list_move_tail(&buf->vb.queue, &q->active);
488 start_video_dma(dev, q, buf); 488 start_video_dma(dev, q, buf);
489 buf->vb.state = STATE_ACTIVE; 489 buf->vb.state = VIDEOBUF_ACTIVE;
490 buf->count = q->count++; 490 buf->count = q->count++;
491 mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT); 491 mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT);
492 dprintk(2,"[%p/%d] restart_queue - first active\n", 492 dprintk(2,"[%p/%d] restart_queue - first active\n",
@@ -496,7 +496,7 @@ static int restart_video_queue(struct cx8800_dev *dev,
496 prev->vb.height == buf->vb.height && 496 prev->vb.height == buf->vb.height &&
497 prev->fmt == buf->fmt) { 497 prev->fmt == buf->fmt) {
498 list_move_tail(&buf->vb.queue, &q->active); 498 list_move_tail(&buf->vb.queue, &q->active);
499 buf->vb.state = STATE_ACTIVE; 499 buf->vb.state = VIDEOBUF_ACTIVE;
500 buf->count = q->count++; 500 buf->count = q->count++;
501 prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma); 501 prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma);
502 dprintk(2,"[%p/%d] restart_queue - move to active\n", 502 dprintk(2,"[%p/%d] restart_queue - move to active\n",
@@ -553,7 +553,7 @@ buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,
553 init_buffer = 1; 553 init_buffer = 1;
554 } 554 }
555 555
556 if (STATE_NEEDS_INIT == buf->vb.state) { 556 if (VIDEOBUF_NEEDS_INIT == buf->vb.state) {
557 init_buffer = 1; 557 init_buffer = 1;
558 if (0 != (rc = videobuf_iolock(q,&buf->vb,NULL))) 558 if (0 != (rc = videobuf_iolock(q,&buf->vb,NULL)))
559 goto fail; 559 goto fail;
@@ -601,7 +601,7 @@ buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,
601 fh->width, fh->height, fh->fmt->depth, fh->fmt->name, 601 fh->width, fh->height, fh->fmt->depth, fh->fmt->name,
602 (unsigned long)buf->risc.dma); 602 (unsigned long)buf->risc.dma);
603 603
604 buf->vb.state = STATE_PREPARED; 604 buf->vb.state = VIDEOBUF_PREPARED;
605 return 0; 605 return 0;
606 606
607 fail: 607 fail:
@@ -625,14 +625,14 @@ buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb)
625 625
626 if (!list_empty(&q->queued)) { 626 if (!list_empty(&q->queued)) {
627 list_add_tail(&buf->vb.queue,&q->queued); 627 list_add_tail(&buf->vb.queue,&q->queued);
628 buf->vb.state = STATE_QUEUED; 628 buf->vb.state = VIDEOBUF_QUEUED;
629 dprintk(2,"[%p/%d] buffer_queue - append to queued\n", 629 dprintk(2,"[%p/%d] buffer_queue - append to queued\n",
630 buf, buf->vb.i); 630 buf, buf->vb.i);
631 631
632 } else if (list_empty(&q->active)) { 632 } else if (list_empty(&q->active)) {
633 list_add_tail(&buf->vb.queue,&q->active); 633 list_add_tail(&buf->vb.queue,&q->active);
634 start_video_dma(dev, q, buf); 634 start_video_dma(dev, q, buf);
635 buf->vb.state = STATE_ACTIVE; 635 buf->vb.state = VIDEOBUF_ACTIVE;
636 buf->count = q->count++; 636 buf->count = q->count++;
637 mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT); 637 mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT);
638 dprintk(2,"[%p/%d] buffer_queue - first active\n", 638 dprintk(2,"[%p/%d] buffer_queue - first active\n",
@@ -644,7 +644,7 @@ buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb)
644 prev->vb.height == buf->vb.height && 644 prev->vb.height == buf->vb.height &&
645 prev->fmt == buf->fmt) { 645 prev->fmt == buf->fmt) {
646 list_add_tail(&buf->vb.queue,&q->active); 646 list_add_tail(&buf->vb.queue,&q->active);
647 buf->vb.state = STATE_ACTIVE; 647 buf->vb.state = VIDEOBUF_ACTIVE;
648 buf->count = q->count++; 648 buf->count = q->count++;
649 prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma); 649 prev->risc.jmp[1] = cpu_to_le32(buf->risc.dma);
650 dprintk(2,"[%p/%d] buffer_queue - append to active\n", 650 dprintk(2,"[%p/%d] buffer_queue - append to active\n",
@@ -652,7 +652,7 @@ buffer_queue(struct videobuf_queue *vq, struct videobuf_buffer *vb)
652 652
653 } else { 653 } else {
654 list_add_tail(&buf->vb.queue,&q->queued); 654 list_add_tail(&buf->vb.queue,&q->queued);
655 buf->vb.state = STATE_QUEUED; 655 buf->vb.state = VIDEOBUF_QUEUED;
656 dprintk(2,"[%p/%d] buffer_queue - first queued\n", 656 dprintk(2,"[%p/%d] buffer_queue - first queued\n",
657 buf, buf->vb.i); 657 buf, buf->vb.i);
658 } 658 }
@@ -822,8 +822,8 @@ video_poll(struct file *file, struct poll_table_struct *wait)
822 return POLLERR; 822 return POLLERR;
823 } 823 }
824 poll_wait(file, &buf->vb.done, wait); 824 poll_wait(file, &buf->vb.done, wait);
825 if (buf->vb.state == STATE_DONE || 825 if (buf->vb.state == VIDEOBUF_DONE ||
826 buf->vb.state == STATE_ERROR) 826 buf->vb.state == VIDEOBUF_ERROR)
827 return POLLIN|POLLRDNORM; 827 return POLLIN|POLLRDNORM;
828 return 0; 828 return 0;
829} 829}
@@ -1496,7 +1496,7 @@ static void cx8800_vid_timeout(unsigned long data)
1496 while (!list_empty(&q->active)) { 1496 while (!list_empty(&q->active)) {
1497 buf = list_entry(q->active.next, struct cx88_buffer, vb.queue); 1497 buf = list_entry(q->active.next, struct cx88_buffer, vb.queue);
1498 list_del(&buf->vb.queue); 1498 list_del(&buf->vb.queue);
1499 buf->vb.state = STATE_ERROR; 1499 buf->vb.state = VIDEOBUF_ERROR;
1500 wake_up(&buf->vb.done); 1500 wake_up(&buf->vb.done);
1501 printk("%s/0: [%p/%d] timeout - dma=0x%08lx\n", core->name, 1501 printk("%s/0: [%p/%d] timeout - dma=0x%08lx\n", core->name,
1502 buf, buf->vb.i, (unsigned long)buf->risc.dma); 1502 buf, buf->vb.i, (unsigned long)buf->risc.dma);