]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: stkwebcam: use u64 for the timestamp internally
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 21 Jan 2019 13:32:26 +0000 (08:32 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 7 Feb 2019 17:13:11 +0000 (12:13 -0500)
Just like vb2 does, use u64 internally to store the timestamps
of the buffers. Only convert to timeval when interfacing with
userspace.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/stkwebcam/stk-webcam.c

index b8ec74d98e8d59bb22d01258114ca15526b43532..03f5e12b13a51678be3e290977bb5c42958456d2 100644 (file)
@@ -1144,7 +1144,7 @@ static int stk_vidioc_dqbuf(struct file *filp,
        sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_QUEUED;
        sbuf->v4lbuf.flags |= V4L2_BUF_FLAG_DONE;
        sbuf->v4lbuf.sequence = ++dev->sequence;
-       v4l2_get_timestamp(&sbuf->v4lbuf.timestamp);
+       sbuf->v4lbuf.timestamp = ns_to_timeval(ktime_get_ns());
 
        *buf = sbuf->v4lbuf;
        return 0;