diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-01-21 16:32:23 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-02-07 20:11:19 +0300 |
commit | 15a40b27beb0a85d7f11d747bfc587dbeb69a96c (patch) | |
tree | dfb30013a9a2e6d5ff2ae27a329439d0321389db /drivers/media/usb/zr364xx | |
parent | 63635b54e07f646aa1d8e54c96b099162a226f7d (diff) | |
download | linux-15a40b27beb0a85d7f11d747bfc587dbeb69a96c.tar.xz |
media: videobuf: use u64 for the timestamp internally
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>
Diffstat (limited to 'drivers/media/usb/zr364xx')
-rw-r--r-- | drivers/media/usb/zr364xx/zr364xx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/usb/zr364xx/zr364xx.c b/drivers/media/usb/zr364xx/zr364xx.c index ab35554cbffa..51aad2cf742f 100644 --- a/drivers/media/usb/zr364xx/zr364xx.c +++ b/drivers/media/usb/zr364xx/zr364xx.c @@ -521,7 +521,7 @@ static void zr364xx_fillbuff(struct zr364xx_camera *cam, /* tell v4l buffer was filled */ buf->vb.field_count = cam->frame_count * 2; - v4l2_get_timestamp(&buf->vb.ts); + buf->vb.ts = ktime_get_ns(); buf->vb.state = VIDEOBUF_DONE; } @@ -549,7 +549,7 @@ static int zr364xx_got_frame(struct zr364xx_camera *cam, int jpgsize) goto unlock; } list_del(&buf->vb.queue); - v4l2_get_timestamp(&buf->vb.ts); + buf->vb.ts = ktime_get_ns(); DBG("[%p/%d] wakeup\n", buf, buf->vb.i); zr364xx_fillbuff(cam, buf, jpgsize); wake_up(&buf->vb.done); |