aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx
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/bt8xx
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/bt8xx')
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c26
-rw-r--r--drivers/media/video/bt8xx/bttv-risc.c14
-rw-r--r--drivers/media/video/bt8xx/bttv-vbi.c6
3 files changed, 23 insertions, 23 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index db0e4b78e7dd..eb2c12eb2fc8 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -1638,7 +1638,7 @@ bttv_switch_overlay(struct bttv *btv, struct bttv_fh *fh,
1638 1638
1639 dprintk("switch_overlay: enter [new=%p]\n",new); 1639 dprintk("switch_overlay: enter [new=%p]\n",new);
1640 if (new) 1640 if (new)
1641 new->vb.state = STATE_DONE; 1641 new->vb.state = VIDEOBUF_DONE;
1642 spin_lock_irqsave(&btv->s_lock,flags); 1642 spin_lock_irqsave(&btv->s_lock,flags);
1643 old = btv->screen; 1643 old = btv->screen;
1644 btv->screen = new; 1644 btv->screen = new;
@@ -1749,7 +1749,7 @@ static int bttv_prepare_buffer(struct videobuf_queue *q,struct bttv *btv,
1749 } 1749 }
1750 1750
1751 /* alloc risc memory */ 1751 /* alloc risc memory */
1752 if (STATE_NEEDS_INIT == buf->vb.state) { 1752 if (VIDEOBUF_NEEDS_INIT == buf->vb.state) {
1753 redo_dma_risc = 1; 1753 redo_dma_risc = 1;
1754 if (0 != (rc = videobuf_iolock(q,&buf->vb,&btv->fbuf))) 1754 if (0 != (rc = videobuf_iolock(q,&buf->vb,&btv->fbuf)))
1755 goto fail; 1755 goto fail;
@@ -1759,7 +1759,7 @@ static int bttv_prepare_buffer(struct videobuf_queue *q,struct bttv *btv,
1759 if (0 != (rc = bttv_buffer_risc(btv,buf))) 1759 if (0 != (rc = bttv_buffer_risc(btv,buf)))
1760 goto fail; 1760 goto fail;
1761 1761
1762 buf->vb.state = STATE_PREPARED; 1762 buf->vb.state = VIDEOBUF_PREPARED;
1763 return 0; 1763 return 0;
1764 1764
1765 fail: 1765 fail:
@@ -1798,7 +1798,7 @@ buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb)
1798 struct bttv_fh *fh = q->priv_data; 1798 struct bttv_fh *fh = q->priv_data;
1799 struct bttv *btv = fh->btv; 1799 struct bttv *btv = fh->btv;
1800 1800
1801 buf->vb.state = STATE_QUEUED; 1801 buf->vb.state = VIDEOBUF_QUEUED;
1802 list_add_tail(&buf->vb.queue,&btv->capture); 1802 list_add_tail(&buf->vb.queue,&btv->capture);
1803 if (!btv->curr.frame_irq) { 1803 if (!btv->curr.frame_irq) {
1804 btv->loop_irq |= 1; 1804 btv->loop_irq |= 1;
@@ -3102,8 +3102,8 @@ static unsigned int bttv_poll(struct file *file, poll_table *wait)
3102 } 3102 }
3103 3103
3104 poll_wait(file, &buf->vb.done, wait); 3104 poll_wait(file, &buf->vb.done, wait);
3105 if (buf->vb.state == STATE_DONE || 3105 if (buf->vb.state == VIDEOBUF_DONE ||
3106 buf->vb.state == STATE_ERROR) 3106 buf->vb.state == VIDEOBUF_ERROR)
3107 return POLLIN|POLLRDNORM; 3107 return POLLIN|POLLRDNORM;
3108 return 0; 3108 return 0;
3109} 3109}
@@ -3699,20 +3699,20 @@ static void bttv_irq_timeout(unsigned long data)
3699 bttv_set_dma(btv, 0); 3699 bttv_set_dma(btv, 0);
3700 3700
3701 /* wake up */ 3701 /* wake up */
3702 bttv_irq_wakeup_video(btv, &old, &new, STATE_ERROR); 3702 bttv_irq_wakeup_video(btv, &old, &new, VIDEOBUF_ERROR);
3703 bttv_irq_wakeup_vbi(btv, ovbi, STATE_ERROR); 3703 bttv_irq_wakeup_vbi(btv, ovbi, VIDEOBUF_ERROR);
3704 3704
3705 /* cancel all outstanding capture / vbi requests */ 3705 /* cancel all outstanding capture / vbi requests */
3706 while (!list_empty(&btv->capture)) { 3706 while (!list_empty(&btv->capture)) {
3707 item = list_entry(btv->capture.next, struct bttv_buffer, vb.queue); 3707 item = list_entry(btv->capture.next, struct bttv_buffer, vb.queue);
3708 list_del(&item->vb.queue); 3708 list_del(&item->vb.queue);
3709 item->vb.state = STATE_ERROR; 3709 item->vb.state = VIDEOBUF_ERROR;
3710 wake_up(&item->vb.done); 3710 wake_up(&item->vb.done);
3711 } 3711 }
3712 while (!list_empty(&btv->vcapture)) { 3712 while (!list_empty(&btv->vcapture)) {
3713 item = list_entry(btv->vcapture.next, struct bttv_buffer, vb.queue); 3713 item = list_entry(btv->vcapture.next, struct bttv_buffer, vb.queue);
3714 list_del(&item->vb.queue); 3714 list_del(&item->vb.queue);
3715 item->vb.state = STATE_ERROR; 3715 item->vb.state = VIDEOBUF_ERROR;
3716 wake_up(&item->vb.done); 3716 wake_up(&item->vb.done);
3717 } 3717 }
3718 3718
@@ -3735,7 +3735,7 @@ bttv_irq_wakeup_top(struct bttv *btv)
3735 3735
3736 do_gettimeofday(&wakeup->vb.ts); 3736 do_gettimeofday(&wakeup->vb.ts);
3737 wakeup->vb.field_count = btv->field_count; 3737 wakeup->vb.field_count = btv->field_count;
3738 wakeup->vb.state = STATE_DONE; 3738 wakeup->vb.state = VIDEOBUF_DONE;
3739 wake_up(&wakeup->vb.done); 3739 wake_up(&wakeup->vb.done);
3740 spin_unlock(&btv->s_lock); 3740 spin_unlock(&btv->s_lock);
3741} 3741}
@@ -3784,7 +3784,7 @@ bttv_irq_switch_video(struct bttv *btv)
3784 } 3784 }
3785 3785
3786 /* wake up finished buffers */ 3786 /* wake up finished buffers */
3787 bttv_irq_wakeup_video(btv, &old, &new, STATE_DONE); 3787 bttv_irq_wakeup_video(btv, &old, &new, VIDEOBUF_DONE);
3788 spin_unlock(&btv->s_lock); 3788 spin_unlock(&btv->s_lock);
3789} 3789}
3790 3790
@@ -3817,7 +3817,7 @@ bttv_irq_switch_vbi(struct bttv *btv)
3817 bttv_buffer_activate_vbi(btv, new); 3817 bttv_buffer_activate_vbi(btv, new);
3818 bttv_set_dma(btv, 0); 3818 bttv_set_dma(btv, 0);
3819 3819
3820 bttv_irq_wakeup_vbi(btv, old, STATE_DONE); 3820 bttv_irq_wakeup_vbi(btv, old, VIDEOBUF_DONE);
3821 spin_unlock(&btv->s_lock); 3821 spin_unlock(&btv->s_lock);
3822} 3822}
3823 3823
diff --git a/drivers/media/video/bt8xx/bttv-risc.c b/drivers/media/video/bt8xx/bttv-risc.c
index 58986f1a5f1a..e5979f77504c 100644
--- a/drivers/media/video/bt8xx/bttv-risc.c
+++ b/drivers/media/video/bt8xx/bttv-risc.c
@@ -582,7 +582,7 @@ bttv_dma_free(struct videobuf_queue *q,struct bttv *btv, struct bttv_buffer *buf
582 videobuf_dma_free(dma); 582 videobuf_dma_free(dma);
583 btcx_riscmem_free(btv->c.pci,&buf->bottom); 583 btcx_riscmem_free(btv->c.pci,&buf->bottom);
584 btcx_riscmem_free(btv->c.pci,&buf->top); 584 btcx_riscmem_free(btv->c.pci,&buf->top);
585 buf->vb.state = STATE_NEEDS_INIT; 585 buf->vb.state = VIDEOBUF_NEEDS_INIT;
586} 586}
587 587
588int 588int
@@ -602,7 +602,7 @@ bttv_buffer_activate_vbi(struct bttv *btv,
602 if (vbi) { 602 if (vbi) {
603 unsigned int crop, vdelay; 603 unsigned int crop, vdelay;
604 604
605 vbi->vb.state = STATE_ACTIVE; 605 vbi->vb.state = VIDEOBUF_ACTIVE;
606 list_del(&vbi->vb.queue); 606 list_del(&vbi->vb.queue);
607 607
608 /* VDELAY is start of video, end of VBI capturing. */ 608 /* VDELAY is start of video, end of VBI capturing. */
@@ -644,12 +644,12 @@ bttv_buffer_activate_video(struct bttv *btv,
644 /* video capture */ 644 /* video capture */
645 if (NULL != set->top && NULL != set->bottom) { 645 if (NULL != set->top && NULL != set->bottom) {
646 if (set->top == set->bottom) { 646 if (set->top == set->bottom) {
647 set->top->vb.state = STATE_ACTIVE; 647 set->top->vb.state = VIDEOBUF_ACTIVE;
648 if (set->top->vb.queue.next) 648 if (set->top->vb.queue.next)
649 list_del(&set->top->vb.queue); 649 list_del(&set->top->vb.queue);
650 } else { 650 } else {
651 set->top->vb.state = STATE_ACTIVE; 651 set->top->vb.state = VIDEOBUF_ACTIVE;
652 set->bottom->vb.state = STATE_ACTIVE; 652 set->bottom->vb.state = VIDEOBUF_ACTIVE;
653 if (set->top->vb.queue.next) 653 if (set->top->vb.queue.next)
654 list_del(&set->top->vb.queue); 654 list_del(&set->top->vb.queue);
655 if (set->bottom->vb.queue.next) 655 if (set->bottom->vb.queue.next)
@@ -666,7 +666,7 @@ bttv_buffer_activate_video(struct bttv *btv,
666 btaor((set->top->btswap & 0x0a) | (set->bottom->btswap & 0x05), 666 btaor((set->top->btswap & 0x0a) | (set->bottom->btswap & 0x05),
667 ~0x0f, BT848_COLOR_CTL); 667 ~0x0f, BT848_COLOR_CTL);
668 } else if (NULL != set->top) { 668 } else if (NULL != set->top) {
669 set->top->vb.state = STATE_ACTIVE; 669 set->top->vb.state = VIDEOBUF_ACTIVE;
670 if (set->top->vb.queue.next) 670 if (set->top->vb.queue.next)
671 list_del(&set->top->vb.queue); 671 list_del(&set->top->vb.queue);
672 bttv_apply_geo(btv, &set->top->geo,1); 672 bttv_apply_geo(btv, &set->top->geo,1);
@@ -677,7 +677,7 @@ bttv_buffer_activate_video(struct bttv *btv,
677 btaor(set->top->btformat & 0xff, ~0xff, BT848_COLOR_FMT); 677 btaor(set->top->btformat & 0xff, ~0xff, BT848_COLOR_FMT);
678 btaor(set->top->btswap & 0x0f, ~0x0f, BT848_COLOR_CTL); 678 btaor(set->top->btswap & 0x0f, ~0x0f, BT848_COLOR_CTL);
679 } else if (NULL != set->bottom) { 679 } else if (NULL != set->bottom) {
680 set->bottom->vb.state = STATE_ACTIVE; 680 set->bottom->vb.state = VIDEOBUF_ACTIVE;
681 if (set->bottom->vb.queue.next) 681 if (set->bottom->vb.queue.next)
682 list_del(&set->bottom->vb.queue); 682 list_del(&set->bottom->vb.queue);
683 bttv_apply_geo(btv, &set->bottom->geo,1); 683 bttv_apply_geo(btv, &set->bottom->geo,1);
diff --git a/drivers/media/video/bt8xx/bttv-vbi.c b/drivers/media/video/bt8xx/bttv-vbi.c
index 346ce019bdcb..b924f05e3b74 100644
--- a/drivers/media/video/bt8xx/bttv-vbi.c
+++ b/drivers/media/video/bt8xx/bttv-vbi.c
@@ -142,7 +142,7 @@ static int vbi_buffer_prepare(struct videobuf_queue *q,
142 redo_dma_risc = 1; 142 redo_dma_risc = 1;
143 } 143 }
144 144
145 if (STATE_NEEDS_INIT == buf->vb.state) { 145 if (VIDEOBUF_NEEDS_INIT == buf->vb.state) {
146 redo_dma_risc = 1; 146 redo_dma_risc = 1;
147 if (0 != (rc = videobuf_iolock(q, &buf->vb, NULL))) 147 if (0 != (rc = videobuf_iolock(q, &buf->vb, NULL)))
148 goto fail; 148 goto fail;
@@ -189,7 +189,7 @@ static int vbi_buffer_prepare(struct videobuf_queue *q,
189 /* For bttv_buffer_activate_vbi(). */ 189 /* For bttv_buffer_activate_vbi(). */
190 buf->geo.vdelay = min_vdelay; 190 buf->geo.vdelay = min_vdelay;
191 191
192 buf->vb.state = STATE_PREPARED; 192 buf->vb.state = VIDEOBUF_PREPARED;
193 buf->vb.field = field; 193 buf->vb.field = field;
194 dprintk("buf prepare %p: top=%p bottom=%p field=%s\n", 194 dprintk("buf prepare %p: top=%p bottom=%p field=%s\n",
195 vb, &buf->top, &buf->bottom, 195 vb, &buf->top, &buf->bottom,
@@ -209,7 +209,7 @@ vbi_buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb)
209 struct bttv_buffer *buf = container_of(vb,struct bttv_buffer,vb); 209 struct bttv_buffer *buf = container_of(vb,struct bttv_buffer,vb);
210 210
211 dprintk("queue %p\n",vb); 211 dprintk("queue %p\n",vb);
212 buf->vb.state = STATE_QUEUED; 212 buf->vb.state = VIDEOBUF_QUEUED;
213 list_add_tail(&buf->vb.queue,&btv->vcapture); 213 list_add_tail(&buf->vb.queue,&btv->vcapture);
214 if (NULL == btv->cvbi) { 214 if (NULL == btv->cvbi) {
215 fh->btv->loop_irq |= 4; 215 fh->btv->loop_irq |= 4;