diff options
author | pang.xunlei <pang.xunlei@linaro.org> | 2014-11-18 06:15:17 -0500 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2014-11-21 14:59:57 -0500 |
commit | 04d9089086a8231ddc69a9f3f25e971a3c1d25e6 (patch) | |
tree | 81cb703b3553469fad9356abac0563881dd405b4 /include/linux/timekeeping.h | |
parent | 21f7eca555ad14e7c7b2cb59a6c6252e74ee5c8b (diff) |
time: Provide y2038 safe timekeeping_inject_sleeptime() replacement
As part of addressing "y2038 problem" for in-kernel uses, this
patch adds timekeeping_inject_sleeptime64() using timespec64.
After this patch, timekeeping_inject_sleeptime() is deprecated
and all its call sites will be fixed using the new interface,
after that it can be removed.
NOTE: timekeeping_inject_sleeptime() is safe actually, but we
want to eliminate timespec eventually, so comes this patch.
Signed-off-by: pang.xunlei <pang.xunlei@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'include/linux/timekeeping.h')
-rw-r--r-- | include/linux/timekeeping.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index 071ad7e0c981..6d76c6502892 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h | |||
@@ -201,7 +201,18 @@ static inline void timekeeping_clocktai(struct timespec *ts) | |||
201 | /* | 201 | /* |
202 | * RTC specific | 202 | * RTC specific |
203 | */ | 203 | */ |
204 | extern void timekeeping_inject_sleeptime(struct timespec *delta); | 204 | extern void timekeeping_inject_sleeptime64(struct timespec64 *delta); |
205 | |||
206 | /** | ||
207 | * Deprecated. Use timekeeping_inject_sleeptime64(). | ||
208 | */ | ||
209 | static inline void timekeeping_inject_sleeptime(struct timespec *delta) | ||
210 | { | ||
211 | struct timespec64 delta64; | ||
212 | |||
213 | delta64 = timespec_to_timespec64(*delta); | ||
214 | timekeeping_inject_sleeptime64(&delta64); | ||
215 | } | ||
205 | 216 | ||
206 | /* | 217 | /* |
207 | * PPS accessor | 218 | * PPS accessor |