Commit 5eba1726 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Mauro Carvalho Chehab

[media] V4L: fix a confusing function name

is_state_active_or_queued() actually returns true if the buffer's state
is neither active nore queued. Rename it for clarity.
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 0724745f
...@@ -75,7 +75,8 @@ struct videobuf_buffer *videobuf_alloc_vb(struct videobuf_queue *q) ...@@ -75,7 +75,8 @@ struct videobuf_buffer *videobuf_alloc_vb(struct videobuf_queue *q)
} }
EXPORT_SYMBOL_GPL(videobuf_alloc_vb); EXPORT_SYMBOL_GPL(videobuf_alloc_vb);
static int is_state_active_or_queued(struct videobuf_queue *q, struct videobuf_buffer *vb) static int state_neither_active_nor_queued(struct videobuf_queue *q,
struct videobuf_buffer *vb)
{ {
unsigned long flags; unsigned long flags;
bool rc; bool rc;
...@@ -95,7 +96,7 @@ int videobuf_waiton(struct videobuf_queue *q, struct videobuf_buffer *vb, ...@@ -95,7 +96,7 @@ int videobuf_waiton(struct videobuf_queue *q, struct videobuf_buffer *vb,
MAGIC_CHECK(vb->magic, MAGIC_BUFFER); MAGIC_CHECK(vb->magic, MAGIC_BUFFER);
if (non_blocking) { if (non_blocking) {
if (is_state_active_or_queued(q, vb)) if (state_neither_active_nor_queued(q, vb))
return 0; return 0;
return -EAGAIN; return -EAGAIN;
} }
...@@ -107,9 +108,10 @@ int videobuf_waiton(struct videobuf_queue *q, struct videobuf_buffer *vb, ...@@ -107,9 +108,10 @@ int videobuf_waiton(struct videobuf_queue *q, struct videobuf_buffer *vb,
if (is_ext_locked) if (is_ext_locked)
mutex_unlock(q->ext_lock); mutex_unlock(q->ext_lock);
if (intr) if (intr)
ret = wait_event_interruptible(vb->done, is_state_active_or_queued(q, vb)); ret = wait_event_interruptible(vb->done,
state_neither_active_nor_queued(q, vb));
else else
wait_event(vb->done, is_state_active_or_queued(q, vb)); wait_event(vb->done, state_neither_active_nor_queued(q, vb));
/* Relock */ /* Relock */
if (is_ext_locked) if (is_ext_locked)
mutex_lock(q->ext_lock); mutex_lock(q->ext_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment