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.
Showing the changes to include/uapi/linux (1 of 9 files). Show all
Unified · Split
| @@ -1017,6 +1017,7 @@ struct v4l2_buffer { · 1016 unmodified lines | ||
| 1017 | 1017 | }; |
| 1018 | 1018 | }; |
| 1019 | 1019 | |
| 1020 | +#ifndef __KERNEL__ | |
| 1020 | 1021 | /** |
| 1021 | 1022 | * v4l2_timeval_to_ns - Convert timeval to nanoseconds |
| 1022 | 1023 | * @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 | 1030 | return (__u64)tv->tv_sec * 1000000000ULL + tv->tv_usec * 1000; |
| 1030 | 1031 | } |
| 1032 | +#endif | |
| 1031 | 1033 | |
| 1032 | 1034 | /* Flags for 'flags' field */ |
| 1033 | 1035 | /* Buffer is mapped (flag) */ |