aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-07-16 17:04:17 -0400
committerJohn Stultz <john.stultz@linaro.org>2014-07-23 13:18:00 -0400
commitafab07c0e91ecf098abf34573ccfcd86d6be26f9 (patch)
tree36f117661404466b11a06fe03f36c942b7a90f62
parentb82c817e2d16e818c472eb71019de521816000a3 (diff)
timekeeping: Use ktime_t based data for ktime_get_clocktai()
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r--include/linux/timekeeping.h9
-rw-r--r--kernel/time/timekeeping.c15
2 files changed, 8 insertions, 16 deletions
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index 2fc606203c8c..3050a7d0a5a9 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -109,7 +109,6 @@ enum tk_offsets {
109extern ktime_t ktime_get(void); 109extern ktime_t ktime_get(void);
110extern ktime_t ktime_get_with_offset(enum tk_offsets offs); 110extern ktime_t ktime_get_with_offset(enum tk_offsets offs);
111extern ktime_t ktime_get_monotonic_offset(void); 111extern ktime_t ktime_get_monotonic_offset(void);
112extern ktime_t ktime_get_clocktai(void);
113 112
114/** 113/**
115 * ktime_get_real - get the real (wall-) time in ktime_t format 114 * ktime_get_real - get the real (wall-) time in ktime_t format
@@ -130,6 +129,14 @@ static inline ktime_t ktime_get_boottime(void)
130 return ktime_get_with_offset(TK_OFFS_BOOT); 129 return ktime_get_with_offset(TK_OFFS_BOOT);
131} 130}
132 131
132/**
133 * ktime_get_clocktai - Returns the TAI time of day in ktime_t format
134 */
135static inline ktime_t ktime_get_clocktai(void)
136{
137 return ktime_get_with_offset(TK_OFFS_TAI);
138}
139
133/* 140/*
134 * RTC specific 141 * RTC specific
135 */ 142 */
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 5e60aa09af79..c083ae2c34b5 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -512,21 +512,6 @@ void timekeeping_clocktai(struct timespec *ts)
512} 512}
513EXPORT_SYMBOL(timekeeping_clocktai); 513EXPORT_SYMBOL(timekeeping_clocktai);
514 514
515
516/**
517 * ktime_get_clocktai - Returns the TAI time of day in a ktime
518 *
519 * Returns the time of day in a ktime.
520 */
521ktime_t ktime_get_clocktai(void)
522{
523 struct timespec ts;
524
525 timekeeping_clocktai(&ts);
526 return timespec_to_ktime(ts);
527}
528EXPORT_SYMBOL(ktime_get_clocktai);
529
530#ifdef CONFIG_NTP_PPS 515#ifdef CONFIG_NTP_PPS
531 516
532/** 517/**