Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65951
b: refs/heads/master
c: d4cae5a
h: refs/heads/master
i:
  65949: 12e6bc5
  65947: a49328f
  65943: 543d298
  65935: 1ec8451
  65919: 03f4bdc
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Oct 10, 2007
1 parent 258c7df commit 1d0e594
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d5f1b01644b6fd5e9eb480a4762cd6b569cb1246
refs/heads/master: d4cae5a50021271b9ef4e5e39e71e177d12fa8cb
23 changes: 14 additions & 9 deletions trunk/drivers/media/video/videobuf-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,30 +108,35 @@ int videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb,
/* --------------------------------------------------------------------- */


void videobuf_queue_init(struct videobuf_queue* q,
void videobuf_queue_core_init(struct videobuf_queue* q,
struct videobuf_queue_ops *ops,
void *dev,
spinlock_t *irqlock,
enum v4l2_buf_type type,
enum v4l2_field field,
unsigned int msize,
void *priv)
void *priv,
struct videobuf_qtype_ops *int_ops)
{
memset(q,0,sizeof(*q));
q->irqlock = irqlock;
q->dev = dev;
q->type = type;
q->field = field;
q->msize = msize;
q->ops = ops;
q->irqlock = irqlock;
q->dev = dev;
q->type = type;
q->field = field;
q->msize = msize;
q->ops = ops;
q->priv_data = priv;
q->int_ops = int_ops;

/* All buffer operations are mandatory */
BUG_ON (!q->ops->buf_setup);
BUG_ON (!q->ops->buf_prepare);
BUG_ON (!q->ops->buf_queue);
BUG_ON (!q->ops->buf_release);

/* Having implementations for abstract methods are mandatory */
BUG_ON (!q->int_ops);

mutex_init(&q->lock);
INIT_LIST_HEAD(&q->stream);
}
Expand Down Expand Up @@ -966,7 +971,7 @@ EXPORT_SYMBOL_GPL(videobuf_iolock);

EXPORT_SYMBOL_GPL(videobuf_alloc);

EXPORT_SYMBOL_GPL(videobuf_queue_init);
EXPORT_SYMBOL_GPL(videobuf_queue_core_init);
EXPORT_SYMBOL_GPL(videobuf_queue_cancel);
EXPORT_SYMBOL_GPL(videobuf_queue_is_busy);

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/videobuf-dma-sg.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,8 @@ void videobuf_queue_pci_init(struct videobuf_queue* q,
unsigned int msize,
void *priv)
{
videobuf_queue_init(q, ops, dev, irqlock, type, field, msize, priv);
q->int_ops=&pci_ops;
videobuf_queue_core_init(q, ops, dev, irqlock, type, field, msize,
priv, &pci_ops);
}

/* --------------------------------------------------------------------- */
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/media/video/videobuf-vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ void videobuf_queue_vmalloc_init(struct videobuf_queue* q,
unsigned int msize,
void *priv)
{
videobuf_queue_init(q, ops, dev, irqlock, type, field, msize, priv);
q->int_ops=&qops;
videobuf_queue_core_init(q, ops, dev, irqlock, type, field, msize,
priv, &qops);
}

EXPORT_SYMBOL_GPL(videobuf_queue_vmalloc_init);
Expand Down
5 changes: 3 additions & 2 deletions trunk/include/media/videobuf-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,15 @@ int videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb,

void *videobuf_alloc(struct videobuf_queue* q);

void videobuf_queue_init(struct videobuf_queue *q,
void videobuf_queue_core_init(struct videobuf_queue *q,
struct videobuf_queue_ops *ops,
void *dev,
spinlock_t *irqlock,
enum v4l2_buf_type type,
enum v4l2_field field,
unsigned int msize,
void *priv);
void *priv,
struct videobuf_qtype_ops *int_ops);
int videobuf_queue_is_busy(struct videobuf_queue *q);
void videobuf_queue_cancel(struct videobuf_queue *q);

Expand Down

0 comments on commit 1d0e594

Please sign in to comment.