summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@iki.fi>2014-03-01 17:28:02 +0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-03-05 23:34:49 +0400
commitc57ff79270ceef426734b3c6b4874c3e415aa743 (patch)
treebfd0225e4737e7263baa6daa0987be168f7df618 /drivers
parentade48681f132188599c5cefa8a3287c2a26fb738 (diff)
downloadlinux-c57ff79270ceef426734b3c6b4874c3e415aa743.tar.xz
[media] v4l: Timestamp flags will soon contain timestamp source, not just type
Mask out other bits when comparing timestamp types. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/v4l2-core/videobuf2-core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index 411429c402e7..521350a74c46 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -1473,7 +1473,8 @@ static int vb2_internal_qbuf(struct vb2_queue *q, struct v4l2_buffer *b)
* For output buffers copy the timestamp if needed,
* and the timecode field and flag if needed.
*/
- if (q->timestamp_flags == V4L2_BUF_FLAG_TIMESTAMP_COPY)
+ if ((q->timestamp_flags & V4L2_BUF_FLAG_TIMESTAMP_MASK) ==
+ V4L2_BUF_FLAG_TIMESTAMP_COPY)
vb->v4l2_buf.timestamp = b->timestamp;
vb->v4l2_buf.flags |= b->flags & V4L2_BUF_FLAG_TIMECODE;
if (b->flags & V4L2_BUF_FLAG_TIMECODE)
@@ -2230,7 +2231,8 @@ int vb2_queue_init(struct vb2_queue *q)
return -EINVAL;
/* Warn that the driver should choose an appropriate timestamp type */
- WARN_ON(q->timestamp_flags == V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN);
+ WARN_ON((q->timestamp_flags & V4L2_BUF_FLAG_TIMESTAMP_MASK) ==
+ V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN);
INIT_LIST_HEAD(&q->queued_list);
INIT_LIST_HEAD(&q->done_list);