提交 fb31cc15 编写于 作者: T Thomas Gleixner 提交者: John Stultz

iio: Use ktime_get_real_ns()

No idea why iio needs wall clock based time stamps, but we can avoid
the timespec conversion dance by using the new interfaces.
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Acked-by: NJonathan Cameron <jic23@kernel.org>
Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
上级 d659f9b1
......@@ -277,14 +277,7 @@ static inline bool iio_channel_has_info(const struct iio_chan_spec *chan,
**/
static inline s64 iio_get_time_ns(void)
{
struct timespec ts;
/*
* calls getnstimeofday.
* If hrtimers then up to ns accurate, if not microsecond.
*/
ktime_get_real_ts(&ts);
return timespec_to_ns(&ts);
return ktime_get_real_ns();
}
/* Device operating modes */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册