[PATCH] [media] videobuf2-core: fix a warning at vb2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It seems that a cut-and-past error were added by the last patch:

drivers/media/video/videobuf2-core.c: In function ‘vb2_qbuf’:
drivers/media/video/videobuf2-core.c:1099:14: warning: comparison between ‘enum v4l2_buf_type’ and ‘enum v4l2_memory’ [-Wenum-compare]

On all places V4L2_MEMORY_USERPTR is used, it is associated with
q->memory, and not b->type. So, the fix seems obvious.

Cc: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx>
Cc: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
Cc: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Cc: Pawel Osciak <pawel@xxxxxxxxxx>
Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
---
 drivers/media/video/videobuf2-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c
index 26cfbf5..2e8f1df 100644
--- a/drivers/media/video/videobuf2-core.c
+++ b/drivers/media/video/videobuf2-core.c
@@ -1096,7 +1096,7 @@ int vb2_qbuf(struct vb2_queue *q, struct v4l2_buffer *b)
 	 * beggining of qbuf processing. This way the queue status is
 	 * consistent after getting driver's lock back.
 	 */
-	if (b->type == V4L2_MEMORY_USERPTR) {
+	if (q->memory == V4L2_MEMORY_USERPTR) {
 		mmap_sem = &current->mm->mmap_sem;
 		call_qop(q, wait_prepare, q);
 		down_read(mmap_sem);
-- 
1.7.8.352.g876a6

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux