History

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.

Arnd Bergmann committed 6 years ago

Commit 77cdffc1 parent 71e37d29 files · +36 −12Browse files

Showing the changes to include/uapi/linux (1 of 9 files). Show all

Unified · Split

include/uapi/linux/videodev2.h+2−0
@@ -1017,6 +1017,7 @@ struct v4l2_buffer { · 1016 unmodified lines
10171017 };
10181018 };
10191019
1020+#ifndef __KERNEL__
10201021 /**
10211022 * v4l2_timeval_to_ns - Convert timeval to nanoseconds
10221023 * @ts: pointer to the timeval variable to be converted
@@ -1028,6 +1029,7 @@ static inline __u64 v4l2_timeval_to_ns(const struct timeval *tv) · 5 unmodified lines
10281029 {
10291030 return (__u64)tv->tv_sec * 1000000000ULL + tv->tv_usec * 1000;
10301031 }
1032+#endif
10311033
10321034 /* Flags for 'flags' field */
10331035 /* Buffer is mapped (flag) */