time: fold __get_realtime_clock_ts() into getnstimeofday()
- getnstimeofday() was just a wrapper around __get_realtime_clock_ts() - Replace calls to __get_realtime_clock_ts() by calls to getnstimeofday() - Fix bogus reference to get_realtime_clock_ts(), which never existed Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: john stultz <johnstul@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
1d76c26228
commit
efd9ac8630
|
@ -82,13 +82,12 @@ static inline s64 __get_nsec_offset(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __get_realtime_clock_ts - Returns the time of day in a timespec
|
* getnstimeofday - Returns the time of day in a timespec
|
||||||
* @ts: pointer to the timespec to be set
|
* @ts: pointer to the timespec to be set
|
||||||
*
|
*
|
||||||
* Returns the time of day in a timespec. Used by
|
* Returns the time of day in a timespec.
|
||||||
* do_gettimeofday() and get_realtime_clock_ts().
|
|
||||||
*/
|
*/
|
||||||
static inline void __get_realtime_clock_ts(struct timespec *ts)
|
void getnstimeofday(struct timespec *ts)
|
||||||
{
|
{
|
||||||
unsigned long seq;
|
unsigned long seq;
|
||||||
s64 nsecs;
|
s64 nsecs;
|
||||||
|
@ -104,30 +103,19 @@ static inline void __get_realtime_clock_ts(struct timespec *ts)
|
||||||
timespec_add_ns(ts, nsecs);
|
timespec_add_ns(ts, nsecs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* getnstimeofday - Returns the time of day in a timespec
|
|
||||||
* @ts: pointer to the timespec to be set
|
|
||||||
*
|
|
||||||
* Returns the time of day in a timespec.
|
|
||||||
*/
|
|
||||||
void getnstimeofday(struct timespec *ts)
|
|
||||||
{
|
|
||||||
__get_realtime_clock_ts(ts);
|
|
||||||
}
|
|
||||||
|
|
||||||
EXPORT_SYMBOL(getnstimeofday);
|
EXPORT_SYMBOL(getnstimeofday);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* do_gettimeofday - Returns the time of day in a timeval
|
* do_gettimeofday - Returns the time of day in a timeval
|
||||||
* @tv: pointer to the timeval to be set
|
* @tv: pointer to the timeval to be set
|
||||||
*
|
*
|
||||||
* NOTE: Users should be converted to using get_realtime_clock_ts()
|
* NOTE: Users should be converted to using getnstimeofday()
|
||||||
*/
|
*/
|
||||||
void do_gettimeofday(struct timeval *tv)
|
void do_gettimeofday(struct timeval *tv)
|
||||||
{
|
{
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
|
|
||||||
__get_realtime_clock_ts(&now);
|
getnstimeofday(&now);
|
||||||
tv->tv_sec = now.tv_sec;
|
tv->tv_sec = now.tv_sec;
|
||||||
tv->tv_usec = now.tv_nsec/1000;
|
tv->tv_usec = now.tv_nsec/1000;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue