diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2014-07-16 17:04:49 -0400 |
|---|---|---|
| committer | John Stultz <john.stultz@linaro.org> | 2014-07-23 18:01:45 -0400 |
| commit | fb31cc153dec0d4bdd9a5d7ce60d61acd04b4304 (patch) | |
| tree | daa34c46b1657c51a89e25ab6efd1c26fe643365 /include/linux/iio | |
| parent | d659f9b135fe26b966a6a4ad7281d35d7dbb1366 (diff) | |
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>
Diffstat (limited to 'include/linux/iio')
| -rw-r--r-- | include/linux/iio/iio.h | 9 |
1 files changed, 1 insertions, 8 deletions
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, | |||
| 277 | **/ | 277 | **/ |
| 278 | static inline s64 iio_get_time_ns(void) | 278 | static inline s64 iio_get_time_ns(void) |
| 279 | { | 279 | { |
| 280 | struct timespec ts; | 280 | return ktime_get_real_ns(); |
| 281 | /* | ||
| 282 | * calls getnstimeofday. | ||
| 283 | * If hrtimers then up to ns accurate, if not microsecond. | ||
| 284 | */ | ||
| 285 | ktime_get_real_ts(&ts); | ||
| 286 | |||
| 287 | return timespec_to_ns(&ts); | ||
| 288 | } | 281 | } |
| 289 | 282 | ||
| 290 | /* Device operating modes */ | 283 | /* Device operating modes */ |
