Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331153
b: refs/heads/master
c: 896f38f
h: refs/heads/master
i:
  331151: 9337d37
v: v3
  • Loading branch information
Ezequiel Garcia authored and Mauro Carvalho Chehab committed Sep 27, 2012
1 parent 9c7771a commit 274cd89
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 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: 4195ec7a8fa253cb7e598a8f99f005bc97d4ac15
refs/heads/master: 896f38f582730a19eb49677105b4fe4c0270b82e
19 changes: 11 additions & 8 deletions trunk/drivers/media/v4l2-core/videobuf2-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1738,14 +1738,17 @@ EXPORT_SYMBOL_GPL(vb2_poll);
*/
int vb2_queue_init(struct vb2_queue *q)
{
BUG_ON(!q);
BUG_ON(!q->ops);
BUG_ON(!q->mem_ops);
BUG_ON(!q->type);
BUG_ON(!q->io_modes);

BUG_ON(!q->ops->queue_setup);
BUG_ON(!q->ops->buf_queue);
/*
* Sanity check
*/
if (WARN_ON(!q) ||
WARN_ON(!q->ops) ||
WARN_ON(!q->mem_ops) ||
WARN_ON(!q->type) ||
WARN_ON(!q->io_modes) ||
WARN_ON(!q->ops->queue_setup) ||
WARN_ON(!q->ops->buf_queue))
return -EINVAL;

INIT_LIST_HEAD(&q->queued_list);
INIT_LIST_HEAD(&q->done_list);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/media/videobuf2-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ int vb2_reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req);
int vb2_create_bufs(struct vb2_queue *q, struct v4l2_create_buffers *create);
int vb2_prepare_buf(struct vb2_queue *q, struct v4l2_buffer *b);

int vb2_queue_init(struct vb2_queue *q);
int __must_check vb2_queue_init(struct vb2_queue *q);

void vb2_queue_release(struct vb2_queue *q);

Expand Down

0 comments on commit 274cd89

Please sign in to comment.