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/common | |
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/common')
-rw-r--r-- | drivers/media/common/saa7146_fops.c | 8 | ||||
-rw-r--r-- | drivers/media/common/saa7146_vbi.c | 10 | ||||
-rw-r--r-- | drivers/media/common/saa7146_video.c | 8 |
3 files changed, 13 insertions, 13 deletions
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c index 67d1b1b1b254..b40bf2306fbc 100644 --- a/drivers/media/common/saa7146_fops.c +++ b/drivers/media/common/saa7146_fops.c | |||
@@ -61,7 +61,7 @@ void saa7146_dma_free(struct saa7146_dev *dev,struct videobuf_queue *q, | |||
61 | videobuf_waiton(&buf->vb,0,0); | 61 | videobuf_waiton(&buf->vb,0,0); |
62 | videobuf_dma_unmap(q, dma); | 62 | videobuf_dma_unmap(q, dma); |
63 | videobuf_dma_free(dma); | 63 | videobuf_dma_free(dma); |
64 | buf->vb.state = STATE_NEEDS_INIT; | 64 | buf->vb.state = VIDEOBUF_NEEDS_INIT; |
65 | } | 65 | } |
66 | 66 | ||
67 | 67 | ||
@@ -83,7 +83,7 @@ int saa7146_buffer_queue(struct saa7146_dev *dev, | |||
83 | buf->activate(dev,buf,NULL); | 83 | buf->activate(dev,buf,NULL); |
84 | } else { | 84 | } else { |
85 | list_add_tail(&buf->vb.queue,&q->queue); | 85 | list_add_tail(&buf->vb.queue,&q->queue); |
86 | buf->vb.state = STATE_QUEUED; | 86 | buf->vb.state = VIDEOBUF_QUEUED; |
87 | DEB_D(("adding buffer %p to queue. (active buffer present)\n", buf)); | 87 | DEB_D(("adding buffer %p to queue. (active buffer present)\n", buf)); |
88 | } | 88 | } |
89 | return 0; | 89 | return 0; |
@@ -174,7 +174,7 @@ void saa7146_buffer_timeout(unsigned long data) | |||
174 | spin_lock_irqsave(&dev->slock,flags); | 174 | spin_lock_irqsave(&dev->slock,flags); |
175 | if (q->curr) { | 175 | if (q->curr) { |
176 | DEB_D(("timeout on %p\n", q->curr)); | 176 | DEB_D(("timeout on %p\n", q->curr)); |
177 | saa7146_buffer_finish(dev,q,STATE_ERROR); | 177 | saa7146_buffer_finish(dev,q,VIDEOBUF_ERROR); |
178 | } | 178 | } |
179 | 179 | ||
180 | /* we don't restart the transfer here like other drivers do. when | 180 | /* we don't restart the transfer here like other drivers do. when |
@@ -366,7 +366,7 @@ static unsigned int fops_poll(struct file *file, struct poll_table_struct *wait) | |||
366 | } | 366 | } |
367 | 367 | ||
368 | poll_wait(file, &buf->done, wait); | 368 | poll_wait(file, &buf->done, wait); |
369 | if (buf->state == STATE_DONE || buf->state == STATE_ERROR) { | 369 | if (buf->state == VIDEOBUF_DONE || buf->state == VIDEOBUF_ERROR) { |
370 | DEB_D(("poll succeeded!\n")); | 370 | DEB_D(("poll succeeded!\n")); |
371 | return POLLIN|POLLRDNORM; | 371 | return POLLIN|POLLRDNORM; |
372 | } | 372 | } |
diff --git a/drivers/media/common/saa7146_vbi.c b/drivers/media/common/saa7146_vbi.c index 6103484e4442..c32dda973e92 100644 --- a/drivers/media/common/saa7146_vbi.c +++ b/drivers/media/common/saa7146_vbi.c | |||
@@ -205,7 +205,7 @@ static int buffer_activate(struct saa7146_dev *dev, | |||
205 | struct saa7146_buf *next) | 205 | struct saa7146_buf *next) |
206 | { | 206 | { |
207 | struct saa7146_vv *vv = dev->vv_data; | 207 | struct saa7146_vv *vv = dev->vv_data; |
208 | buf->vb.state = STATE_ACTIVE; | 208 | buf->vb.state = VIDEOBUF_ACTIVE; |
209 | 209 | ||
210 | DEB_VBI(("dev:%p, buf:%p, next:%p\n",dev,buf,next)); | 210 | DEB_VBI(("dev:%p, buf:%p, next:%p\n",dev,buf,next)); |
211 | saa7146_set_vbi_capture(dev,buf,next); | 211 | saa7146_set_vbi_capture(dev,buf,next); |
@@ -238,7 +238,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,e | |||
238 | if (buf->vb.size != size) | 238 | if (buf->vb.size != size) |
239 | saa7146_dma_free(dev,q,buf); | 239 | saa7146_dma_free(dev,q,buf); |
240 | 240 | ||
241 | if (STATE_NEEDS_INIT == buf->vb.state) { | 241 | if (VIDEOBUF_NEEDS_INIT == buf->vb.state) { |
242 | struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); | 242 | struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); |
243 | 243 | ||
244 | buf->vb.width = llength; | 244 | buf->vb.width = llength; |
@@ -257,7 +257,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,e | |||
257 | if (0 != err) | 257 | if (0 != err) |
258 | return err; | 258 | return err; |
259 | } | 259 | } |
260 | buf->vb.state = STATE_PREPARED; | 260 | buf->vb.state = VIDEOBUF_PREPARED; |
261 | buf->activate = buffer_activate; | 261 | buf->activate = buffer_activate; |
262 | 262 | ||
263 | return 0; | 263 | return 0; |
@@ -335,7 +335,7 @@ static void vbi_stop(struct saa7146_fh *fh, struct file *file) | |||
335 | saa7146_write(dev, MC1, MASK_20); | 335 | saa7146_write(dev, MC1, MASK_20); |
336 | 336 | ||
337 | if (vv->vbi_q.curr) { | 337 | if (vv->vbi_q.curr) { |
338 | saa7146_buffer_finish(dev,&vv->vbi_q,STATE_DONE); | 338 | saa7146_buffer_finish(dev,&vv->vbi_q,VIDEOBUF_DONE); |
339 | } | 339 | } |
340 | 340 | ||
341 | videobuf_queue_cancel(&fh->vbi_q); | 341 | videobuf_queue_cancel(&fh->vbi_q); |
@@ -458,7 +458,7 @@ static void vbi_irq_done(struct saa7146_dev *dev, unsigned long status) | |||
458 | /* this must be += 2, one count for each field */ | 458 | /* this must be += 2, one count for each field */ |
459 | vv->vbi_fieldcount+=2; | 459 | vv->vbi_fieldcount+=2; |
460 | vv->vbi_q.curr->vb.field_count = vv->vbi_fieldcount; | 460 | vv->vbi_q.curr->vb.field_count = vv->vbi_fieldcount; |
461 | saa7146_buffer_finish(dev,&vv->vbi_q,STATE_DONE); | 461 | saa7146_buffer_finish(dev,&vv->vbi_q,VIDEOBUF_DONE); |
462 | } else { | 462 | } else { |
463 | DEB_VBI(("dev:%p\n",dev)); | 463 | DEB_VBI(("dev:%p\n",dev)); |
464 | } | 464 | } |
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index ae36d101006b..c31ab480d8e1 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c | |||
@@ -1235,7 +1235,7 @@ static int buffer_activate (struct saa7146_dev *dev, | |||
1235 | { | 1235 | { |
1236 | struct saa7146_vv *vv = dev->vv_data; | 1236 | struct saa7146_vv *vv = dev->vv_data; |
1237 | 1237 | ||
1238 | buf->vb.state = STATE_ACTIVE; | 1238 | buf->vb.state = VIDEOBUF_ACTIVE; |
1239 | saa7146_set_capture(dev,buf,next); | 1239 | saa7146_set_capture(dev,buf,next); |
1240 | 1240 | ||
1241 | mod_timer(&vv->video_q.timeout, jiffies+BUFFER_TIMEOUT); | 1241 | mod_timer(&vv->video_q.timeout, jiffies+BUFFER_TIMEOUT); |
@@ -1281,7 +1281,7 @@ static int buffer_prepare(struct videobuf_queue *q, | |||
1281 | saa7146_dma_free(dev,q,buf); | 1281 | saa7146_dma_free(dev,q,buf); |
1282 | } | 1282 | } |
1283 | 1283 | ||
1284 | if (STATE_NEEDS_INIT == buf->vb.state) { | 1284 | if (VIDEOBUF_NEEDS_INIT == buf->vb.state) { |
1285 | struct saa7146_format *sfmt; | 1285 | struct saa7146_format *sfmt; |
1286 | 1286 | ||
1287 | buf->vb.bytesperline = fh->video_fmt.bytesperline; | 1287 | buf->vb.bytesperline = fh->video_fmt.bytesperline; |
@@ -1314,7 +1314,7 @@ static int buffer_prepare(struct videobuf_queue *q, | |||
1314 | if (err) | 1314 | if (err) |
1315 | goto oops; | 1315 | goto oops; |
1316 | } | 1316 | } |
1317 | buf->vb.state = STATE_PREPARED; | 1317 | buf->vb.state = VIDEOBUF_PREPARED; |
1318 | buf->activate = buffer_activate; | 1318 | buf->activate = buffer_activate; |
1319 | 1319 | ||
1320 | return 0; | 1320 | return 0; |
@@ -1453,7 +1453,7 @@ static void video_irq_done(struct saa7146_dev *dev, unsigned long st) | |||
1453 | 1453 | ||
1454 | /* only finish the buffer if we have one... */ | 1454 | /* only finish the buffer if we have one... */ |
1455 | if( NULL != q->curr ) { | 1455 | if( NULL != q->curr ) { |
1456 | saa7146_buffer_finish(dev,q,STATE_DONE); | 1456 | saa7146_buffer_finish(dev,q,VIDEOBUF_DONE); |
1457 | } | 1457 | } |
1458 | saa7146_buffer_next(dev,q,0); | 1458 | saa7146_buffer_next(dev,q,0); |
1459 | 1459 | ||