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 <t...@linutronix.de>
Acked-by: Jonathan Cameron <ji...@kernel.org>
---
 include/linux/iio/iio.h |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Index: tip/include/linux/iio/iio.h
===================================================================
--- tip.orig/include/linux/iio/iio.h
+++ tip/include/linux/iio/iio.h
@@ -277,14 +277,7 @@ static inline bool iio_channel_has_info(
  **/
 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 */


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to