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
1017 };1017 };
1018};1018};
1019 1019
1020#ifndef __KERNEL__
1020/**1021/**
1021 * v4l2_timeval_to_ns - Convert timeval to nanoseconds1022 * v4l2_timeval_to_ns - Convert timeval to nanoseconds
1022 * @ts: pointer to the timeval variable to be converted1023 * @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
1028{1029{
1029 return (__u64)tv->tv_sec * 1000000000ULL + tv->tv_usec * 1000;1030 return (__u64)tv->tv_sec * 1000000000ULL + tv->tv_usec * 1000;
1030}1031}
1032#endif
1031 1033
1032/* Flags for 'flags' field */1034/* Flags for 'flags' field */
1033/* Buffer is mapped (flag) */1035/* Buffer is mapped (flag) */