diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-01-21 14:32:22 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-02-07 18:11:15 +0100 |
commit | 63635b54e07f646aa1d8e54c96b099162a226f7d (patch) | |
tree | 1cf4e238dd9cbe6c2e49df799acb53d2707b98eb /include/media/v4l2-event.h | |
parent | media: staging: intel-ipu3: fix unsigned comparison with < 0 (diff) | |
download | linux-63635b54e07f646aa1d8e54c96b099162a226f7d.tar.xz linux-63635b54e07f646aa1d8e54c96b099162a226f7d.zip |
media: v4l2-event: keep track of the timestamp in ns
Internally use ktime_get_ns() to get the timestamp of the event.
Only convert to timespec 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 'include/media/v4l2-event.h')
-rw-r--r-- | include/media/v4l2-event.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/media/v4l2-event.h b/include/media/v4l2-event.h index 17833e886e11..c2b6cdc714d2 100644 --- a/include/media/v4l2-event.h +++ b/include/media/v4l2-event.h @@ -34,11 +34,13 @@ struct video_device; * @list: List node for the v4l2_fh->available list. * @sev: Pointer to parent v4l2_subscribed_event. * @event: The event itself. + * @ts: The timestamp of the event. */ struct v4l2_kevent { struct list_head list; struct v4l2_subscribed_event *sev; struct v4l2_event event; + u64 ts; }; /** |