Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1426590
| From | Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 3/4] vb2: Merge vb2_internal_qbuf and vb2_qbuf |
| Date | 2016-06-20 15:10 +0200 |
| Message-ID | <rM77J-d8-37@gated-at.bofh.it> (permalink) |
| References | <rM77I-d8-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
After all the code refactoring, vb2_internal_dqbuf is only called by
vb2_dqbuf.
Since the function it is very simple, there is no need to have
two functions.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
drivers/media/v4l2-core/videobuf2-v4l2.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c
index 7dff2b688a9f..9cfbb6e4bc28 100644
--- a/drivers/media/v4l2-core/videobuf2-v4l2.c
+++ b/drivers/media/v4l2-core/videobuf2-v4l2.c
@@ -427,7 +427,7 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb,
if (V4L2_TYPE_IS_OUTPUT(b->type)) {
/*
* For output buffers mask out the timecode flag:
- * this will be handled later in vb2_internal_qbuf().
+ * this will be handled later in vb2_qbuf().
* The 'field' is valid metadata for this output buffer
* and so that needs to be copied here.
*/
@@ -586,13 +586,6 @@ int vb2_create_bufs(struct vb2_queue *q, struct v4l2_create_buffers *create)
}
EXPORT_SYMBOL_GPL(vb2_create_bufs);
-static int vb2_internal_qbuf(struct vb2_queue *q, struct v4l2_buffer *b)
-{
- int ret = vb2_queue_or_prepare_buf(q, b, "qbuf");
-
- return ret ? ret : vb2_core_qbuf(q, b->index, b);
-}
-
/**
* vb2_qbuf() - Queue a buffer from userspace
* @q: videobuf2 queue
@@ -612,12 +605,15 @@ static int vb2_internal_qbuf(struct vb2_queue *q, struct v4l2_buffer *b)
*/
int vb2_qbuf(struct vb2_queue *q, struct v4l2_buffer *b)
{
+ int ret;
+
if (vb2_fileio_is_active(q)) {
dprintk(1, "file io in progress\n");
return -EBUSY;
}
- return vb2_internal_qbuf(q, b);
+ ret = vb2_queue_or_prepare_buf(q, b, "qbuf");
+ return ret ? ret : vb2_core_qbuf(q, b->index, b);
}
EXPORT_SYMBOL_GPL(vb2_qbuf);
--
2.8.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 1/4] vb2: V4L2_BUF_FLAG_DONE is set after DQBUF Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> - 2016-06-20 15:10 +0200
[PATCH v3 4/4] vb2: Fix comment Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> - 2016-06-20 15:10 +0200
[PATCH v3 3/4] vb2: Merge vb2_internal_qbuf and vb2_qbuf Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> - 2016-06-20 15:10 +0200
[PATCH v3 2/4] vb2: Merge vb2_internal_dqbuf and vb2_dqbuf Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> - 2016-06-20 15:10 +0200
Re: [PATCH v3 2/4] vb2: Merge vb2_internal_dqbuf and vb2_dqbuf Sakari Ailus <sakari.ailus@iki.fi> - 2016-06-20 17:10 +0200
csiph-web