aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Helsley <matthltc@us.ibm.com>2006-01-09 23:52:40 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:01:39 -0500
commitd1c0b8f835aeba85aa428aaec6d521ef4639c7fa (patch)
treec998a5285cd75d540be20ee6e4aa7ebff0cfe7f9
parentcaf3c9dc56f5758ca6016513e2790a151bf2077d (diff)
[PATCH] Remove getnstimestamp()
Remove getnstimestamp() in favor of ktime.h's ktime_get_ts() Signed-off-by: Matt Helsley <matthltc@us.ibm.com> Cc: john stultz <johnstul@us.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/linux/time.h1
-rw-r--r--kernel/time.c22
2 files changed, 0 insertions, 23 deletions
diff --git a/include/linux/time.h b/include/linux/time.h
index 1201155b2202..f2aca7ec6325 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -80,7 +80,6 @@ extern int do_setitimer(int which, struct itimerval *value,
80 struct itimerval *ovalue); 80 struct itimerval *ovalue);
81extern int do_getitimer(int which, struct itimerval *value); 81extern int do_getitimer(int which, struct itimerval *value);
82extern void getnstimeofday(struct timespec *tv); 82extern void getnstimeofday(struct timespec *tv);
83extern void getnstimestamp(struct timespec *ts);
84 83
85extern struct timespec timespec_trunc(struct timespec t, unsigned gran); 84extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
86 85
diff --git a/kernel/time.c b/kernel/time.c
index cf5a4582a672..169e8329e0b6 100644
--- a/kernel/time.c
+++ b/kernel/time.c
@@ -564,28 +564,6 @@ void getnstimeofday(struct timespec *tv)
564EXPORT_SYMBOL_GPL(getnstimeofday); 564EXPORT_SYMBOL_GPL(getnstimeofday);
565#endif 565#endif
566 566
567void getnstimestamp(struct timespec *ts)
568{
569 unsigned int seq;
570 struct timespec wall2mono;
571
572 /* synchronize with settimeofday() changes */
573 do {
574 seq = read_seqbegin(&xtime_lock);
575 getnstimeofday(ts);
576 wall2mono = wall_to_monotonic;
577 } while(unlikely(read_seqretry(&xtime_lock, seq)));
578
579 /* adjust to monotonicaly-increasing values */
580 ts->tv_sec += wall2mono.tv_sec;
581 ts->tv_nsec += wall2mono.tv_nsec;
582 while (unlikely(ts->tv_nsec >= NSEC_PER_SEC)) {
583 ts->tv_nsec -= NSEC_PER_SEC;
584 ts->tv_sec++;
585 }
586}
587EXPORT_SYMBOL_GPL(getnstimestamp);
588
589/* Converts Gregorian date to seconds since 1970-01-01 00:00:00. 567/* Converts Gregorian date to seconds since 1970-01-01 00:00:00.
590 * Assumes input in normal date format, i.e. 1980-12-31 23:59:59 568 * Assumes input in normal date format, i.e. 1980-12-31 23:59:59
591 * => year=1980, mon=12, day=31, hour=23, min=59, sec=59. 569 * => year=1980, mon=12, day=31, hour=23, min=59, sec=59.