From: Thomas Gleixner Date: Wed, 16 Jul 2014 21:04:49 +0000 (+0000) Subject: iio: Use ktime_get_real_ns() X-Git-Tag: MMI-PSA29.97-13-9~11784^2~28 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fb31cc153dec0d4bdd9a5d7ce60d61acd04b4304;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Acked-by: Jonathan Cameron Signed-off-by: John Stultz --- diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index ccde91725f98..15dc6bc2bdd2 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h @@ -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 */