diff options
author | Xunlei Pang <pang.xunlei@linaro.org> | 2015-07-26 12:45:39 +0200 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2015-08-17 20:25:16 +0200 |
commit | 7494e9eedee2121305a48af4fbbcedb69a2c2b93 (patch) | |
tree | 4e4861c3e97847d879946a5516d45a4bb27440e4 /kernel/time/ntp.c | |
parent | time: Always make sure wall_to_monotonic isn't positive (diff) | |
download | linux-7494e9eedee2121305a48af4fbbcedb69a2c2b93.tar.xz linux-7494e9eedee2121305a48af4fbbcedb69a2c2b93.zip |
time: Add the common weak version of update_persistent_clock()
The weak update_persistent_clock64() calls update_persistent_clock(),
if the architecture defines an update_persistent_clock64() to replace
and remove its update_persistent_clock() version, when building the
kernel the linker will throw an undefined symbol error, that is, any
arch that switches to update_persistent_clock64() will have this issue.
To solve the issue, we add the common weak update_persistent_clock().
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'kernel/time/ntp.c')
-rw-r--r-- | kernel/time/ntp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index fb4d98c7fd43..df68cb875248 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -487,6 +487,11 @@ out: } #ifdef CONFIG_GENERIC_CMOS_UPDATE +int __weak update_persistent_clock(struct timespec now) +{ + return -ENODEV; +} + int __weak update_persistent_clock64(struct timespec64 now64) { struct timespec now; |