On Thursday 29 October 2015 01:22:02 Amitoj Kaur Chawla wrote:
32 bit systems using 'struct timeval' will break in the year 2038, so we replace the code appropriately.
This patch replaces struct timeval with struct timespec64.
The patch also changes the code to use ktime_get_real_ts64() which returns a 'struct timespec64' instead of do_gettimeofday() which returns a 'struct timeval'
Signed-off-by: Amitoj Kaur Chawla amitoj1606@gmail.com
The patch looks correct to me, but I'd suggest using monotonic time to make the driver more robust against 'settimeofday' calls. It would also be helpful to clarify in the description that the driver has no y2038 problem as it only uses the microsecond portion of timeval, not the seconds.
Arnd