diff options
Diffstat (limited to 'kernel/time/timecompare.c')
-rw-r--r-- | kernel/time/timecompare.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/time/timecompare.c b/kernel/time/timecompare.c index 71e7f1a19156..ac38fbb176cc 100644 --- a/kernel/time/timecompare.c +++ b/kernel/time/timecompare.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/timecompare.h> | 20 | #include <linux/timecompare.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/slab.h> | ||
22 | #include <linux/math64.h> | 23 | #include <linux/math64.h> |
23 | 24 | ||
24 | /* | 25 | /* |
@@ -40,7 +41,7 @@ ktime_t timecompare_transform(struct timecompare *sync, | |||
40 | 41 | ||
41 | return ns_to_ktime(nsec); | 42 | return ns_to_ktime(nsec); |
42 | } | 43 | } |
43 | EXPORT_SYMBOL(timecompare_transform); | 44 | EXPORT_SYMBOL_GPL(timecompare_transform); |
44 | 45 | ||
45 | int timecompare_offset(struct timecompare *sync, | 46 | int timecompare_offset(struct timecompare *sync, |
46 | s64 *offset, | 47 | s64 *offset, |
@@ -89,7 +90,7 @@ int timecompare_offset(struct timecompare *sync, | |||
89 | * source time | 90 | * source time |
90 | */ | 91 | */ |
91 | sample.offset = | 92 | sample.offset = |
92 | ktime_to_ns(ktime_add(end, start)) / 2 - | 93 | (ktime_to_ns(end) + ktime_to_ns(start)) / 2 - |
93 | ts; | 94 | ts; |
94 | 95 | ||
95 | /* simple insertion sort based on duration */ | 96 | /* simple insertion sort based on duration */ |
@@ -131,7 +132,7 @@ int timecompare_offset(struct timecompare *sync, | |||
131 | 132 | ||
132 | return used; | 133 | return used; |
133 | } | 134 | } |
134 | EXPORT_SYMBOL(timecompare_offset); | 135 | EXPORT_SYMBOL_GPL(timecompare_offset); |
135 | 136 | ||
136 | void __timecompare_update(struct timecompare *sync, | 137 | void __timecompare_update(struct timecompare *sync, |
137 | u64 source_tstamp) | 138 | u64 source_tstamp) |
@@ -188,4 +189,4 @@ void __timecompare_update(struct timecompare *sync, | |||
188 | } | 189 | } |
189 | } | 190 | } |
190 | } | 191 | } |
191 | EXPORT_SYMBOL(__timecompare_update); | 192 | EXPORT_SYMBOL_GPL(__timecompare_update); |