diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-05-23 18:18:40 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-05-23 18:18:40 -0400 |
commit | fc05505b77f7900a1bb74fb3f3a4343dee4265a4 (patch) | |
tree | 6517919cb60bd9465078512cacbefd8c77f94b76 /arch/x86/vdso/vclock_gettime.c | |
parent | a2ab67fae1ab9226679495a8d260f4e6555efc5f (diff) | |
parent | 11c79740d3c03cb81f84e98cf2e2dbd8d9bb53cd (diff) |
Merge branch 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6 into devel
Diffstat (limited to 'arch/x86/vdso/vclock_gettime.c')
-rw-r--r-- | arch/x86/vdso/vclock_gettime.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c index d9d35824c56f..6a40b78b46aa 100644 --- a/arch/x86/vdso/vclock_gettime.c +++ b/arch/x86/vdso/vclock_gettime.c | |||
@@ -104,11 +104,13 @@ notrace int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz) | |||
104 | { | 104 | { |
105 | long ret; | 105 | long ret; |
106 | if (likely(gtod->sysctl_enabled && gtod->clock.vread)) { | 106 | if (likely(gtod->sysctl_enabled && gtod->clock.vread)) { |
107 | BUILD_BUG_ON(offsetof(struct timeval, tv_usec) != | 107 | if (likely(tv != NULL)) { |
108 | offsetof(struct timespec, tv_nsec) || | 108 | BUILD_BUG_ON(offsetof(struct timeval, tv_usec) != |
109 | sizeof(*tv) != sizeof(struct timespec)); | 109 | offsetof(struct timespec, tv_nsec) || |
110 | do_realtime((struct timespec *)tv); | 110 | sizeof(*tv) != sizeof(struct timespec)); |
111 | tv->tv_usec /= 1000; | 111 | do_realtime((struct timespec *)tv); |
112 | tv->tv_usec /= 1000; | ||
113 | } | ||
112 | if (unlikely(tz != NULL)) { | 114 | if (unlikely(tz != NULL)) { |
113 | /* Avoid memcpy. Some old compilers fail to inline it */ | 115 | /* Avoid memcpy. Some old compilers fail to inline it */ |
114 | tz->tz_minuteswest = gtod->sys_tz.tz_minuteswest; | 116 | tz->tz_minuteswest = gtod->sys_tz.tz_minuteswest; |