Merge branch 'for-linus' of git://git.kernel.dk/linux-block
[deliverable/linux.git] / include / linux / timekeeping.h
index 96f37bee3bc13b96f3ddd9a27657e6d64340ceb3..37dbacf84849add3a31b410ee06d26ec08c56a07 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _LINUX_TIMEKEEPING_H
 #define _LINUX_TIMEKEEPING_H
 
+#include <asm-generic/errno-base.h>
+
 /* Included from linux/ktime.h */
 
 void timekeeping_init(void);
@@ -11,8 +13,19 @@ extern int timekeeping_suspended;
  */
 extern void do_gettimeofday(struct timeval *tv);
 extern int do_settimeofday64(const struct timespec64 *ts);
-extern int do_sys_settimeofday(const struct timespec *tv,
-                              const struct timezone *tz);
+extern int do_sys_settimeofday64(const struct timespec64 *tv,
+                                const struct timezone *tz);
+static inline int do_sys_settimeofday(const struct timespec *tv,
+                                     const struct timezone *tz)
+{
+       struct timespec64 ts64;
+
+       if (!tv)
+               return -EINVAL;
+
+       ts64 = timespec_to_timespec64(*tv);
+       return do_sys_settimeofday64(&ts64, tz);
+}
 
 /*
  * Kernel time accessors
This page took 0.027831 seconds and 5 git commands to generate.