summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/stkwebcam
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-12-16 15:15:00 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-01-03 15:43:35 +0100
commit77cdffcb0bfb87fe3645894335cb8cb94917e6ac (patch)
tree59ef93d844f55924b0eb09ae2a2132e3b485e5be /drivers/media/usb/stkwebcam
parentmedia: documentation: fix video_event description (diff)
downloadlinux-77cdffcb0bfb87fe3645894335cb8cb94917e6ac.tar.xz
linux-77cdffcb0bfb87fe3645894335cb8cb94917e6ac.zip
media: v4l2: abstract timeval handling in v4l2_buffer
As a preparation for adding 64-bit time_t support in the uapi, change the drivers to no longer care about the format of the timestamp field in struct v4l2_buffer. The v4l2_timeval_to_ns() function is no longer needed in the kernel after this, but there is userspace code relying on it to be part of the uapi header. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: replace spaces by tabs] Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/usb/stkwebcam')
-rw-r--r--drivers/media/usb/stkwebcam/stk-webcam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c
index 21f90a887485..b22501f76b78 100644
--- a/drivers/media/usb/stkwebcam/stk-webcam.c
+++ b/drivers/media/usb/stkwebcam/stk-webcam.c
@@ -1125,7 +1125,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;
- sbuf->v4lbuf.timestamp = ns_to_timeval(ktime_get_ns());
+ v4l2_buffer_set_timestamp(&sbuf->v4lbuf, ktime_get_ns());
*buf = sbuf->v4lbuf;
return 0;