summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Wereski <m.wereski@partner.samsung.com>2015-04-17 15:55:55 +0200
committerMaciej Wereski <m.wereski@partner.samsung.com>2015-04-17 16:29:56 +0200
commit6cf21dbb265781f320c06968ce0cc7a0fda6c964 (patch)
tree7ad500ae7f62a69423d01daaeef6405247088f4a
parentd885427986a0520bf9daba74d41501377a9c6396 (diff)
downloadlinux-3.10-6cf21dbb265781f320c06968ce0cc7a0fda6c964.tar.gz
linux-3.10-6cf21dbb265781f320c06968ce0cc7a0fda6c964.tar.bz2
linux-3.10-6cf21dbb265781f320c06968ce0cc7a0fda6c964.zip
[kdbus] New functions as wrappers of their 3.10 counterparts
Change-Id: I78aa8e359bd840049d6098b683e138898724aa95 Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
-rw-r--r--compat/include/linux/time64.h23
-rw-r--r--compat/include/linux/uio.h3
2 files changed, 26 insertions, 0 deletions
diff --git a/compat/include/linux/time64.h b/compat/include/linux/time64.h
new file mode 100644
index 00000000000..745bccbdb71
--- /dev/null
+++ b/compat/include/linux/time64.h
@@ -0,0 +1,23 @@
+#ifndef _LINUX_TIME64_H
+#define _LINUX_TIME64_H
+
+#include <linux/time.h>
+#include <linux/ktime.h>
+
+/* copied from struct timespec */
+struct timespec64 {
+ __kernel_time_t tv_sec; /* seconds */
+ long tv_nsec; /* nanoseconds */
+};
+
+static inline void ktime_get_ts64(struct timespec64 *ts)
+{
+ ktime_get_ts((struct timespec *)ts);
+}
+
+static inline s64 timespec64_to_ns(const struct timespec64 *ts)
+{
+ return (s64) timespec_to_ns((struct timespec *)ts);
+}
+
+#endif /* _LINUX_TIME64_H */
diff --git a/compat/include/linux/uio.h b/compat/include/linux/uio.h
index 71880299ed4..b691aa5fa9c 100644
--- a/compat/include/linux/uio.h
+++ b/compat/include/linux/uio.h
@@ -12,6 +12,9 @@
#include <linux/kernel.h>
#include <uapi/linux/uio.h>
+/* other compatibility headers */
+#include <linux/time64.h>
+
struct page;
struct kvec {