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: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
This commit is contained in:
Thomas Gleixner 2014-07-16 21:04:49 +00:00 committed by John Stultz
parent d659f9b135
commit fb31cc153d
1 changed files with 1 additions and 8 deletions

View File

@ -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 */