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-06-09 11:31:26 +0200
commitbb38ea18295f271a91fbc8af753a704b158d0454 (patch)
tree0aac7bd9a9571f668741632031f1045824707f43
parenta0ed95c2dbc4714990220eab4b0771ad1813c8a4 (diff)
downloadlinux-3.10-bb38ea18295f271a91fbc8af753a704b158d0454.tar.gz
linux-3.10-bb38ea18295f271a91fbc8af753a704b158d0454.tar.bz2
linux-3.10-bb38ea18295f271a91fbc8af753a704b158d0454.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 {