]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/linux/timekeeping32.h
ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion()
[mirror_ubuntu-bionic-kernel.git] / include / linux / timekeeping32.h
index af4114d5dc1751235fe99fbd70b79ae5cca73ccd..acb45675b4214e7602911b0db3845bdd65ddd73f 100644 (file)
@@ -6,8 +6,19 @@
  * over time so we can remove the file here.
  */
 
-extern void do_gettimeofday(struct timeval *tv);
-unsigned long get_seconds(void);
+static inline void do_gettimeofday(struct timeval *tv)
+{
+       struct timespec64 now;
+
+       ktime_get_real_ts64(&now);
+       tv->tv_sec = now.tv_sec;
+       tv->tv_usec = now.tv_nsec/1000;
+}
+
+static inline unsigned long get_seconds(void)
+{
+       return ktime_get_real_seconds();
+}
 
 /* does not take xtime_lock */
 struct timespec __current_kernel_time(void);