Closed hyperb1iss closed 7 years ago
Before i merge, do all linux builds has all needed functions? As i dont see any kernel ver checks. Thanks.
ktime_get_real_ts64 was introduced in 3.17. I can wrap this in a macro.
This seems to be the right way to go. Turns out CURRENT_TIME_SEC is not y2038 safe either.
Haven't tested this actually works on an old kernel though, I'll try it out on an Android kernel later tonight.
Thanks, will be great to get support for all kernels, this driver used from 2.6.x to 4.12.x as of now. Every change, we have to make sure its not braking that.
There we go. This works on my 4.12-rc4 laptop and my OnePlus 3 (3.18). Kernels before 4.8 (when current_time appeared) will use the old code hidden under a macro.
Looks great, thanks for your contribution!