diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-30 13:10:44 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-30 13:12:43 -0500 |
commit | 57e43cfb6cf9b88d776f3193f12cd6f81177bd6e (patch) | |
tree | 14e5fadfe29e7fd977e1e5c26b87c0a0b118318c | |
parent | 4419b8aca8dc1339a8f01c5e9efbed500780131e (diff) |
[media] videobuf2-core: fix a warning at vb2
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@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | 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 26cfbf5c9f8c..2e8f1df775b6 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) | |||
1096 | * beggining of qbuf processing. This way the queue status is | 1096 | * beggining of qbuf processing. This way the queue status is |
1097 | * consistent after getting driver's lock back. | 1097 | * consistent after getting driver's lock back. |
1098 | */ | 1098 | */ |
1099 | if (b->type == V4L2_MEMORY_USERPTR) { | 1099 | if (q->memory == V4L2_MEMORY_USERPTR) { |
1100 | mmap_sem = ¤t->mm->mmap_sem; | 1100 | mmap_sem = ¤t->mm->mmap_sem; |
1101 | call_qop(q, wait_prepare, q); | 1101 | call_qop(q, wait_prepare, q); |
1102 | down_read(mmap_sem); | 1102 | down_read(mmap_sem); |