etnaviv: drm: Use NSEC_PER_SEC
[mesa.git] / src / etnaviv / drm / etnaviv_priv.h
index 8ceb6c3c4313b310fe50b3128f0c1bb01715ec4f..93bd2d90985e1746eb5f744c4cb400f414b78477 100644 (file)
@@ -42,6 +42,7 @@
 
 #include "util/list.h"
 #include "util/macros.h"
+#include "util/timespec.h"
 #include "util/u_atomic.h"
 #include "util/u_debug.h"
 #include "util/vma.h"
@@ -205,8 +206,8 @@ static inline void get_abs_timeout(struct drm_etnaviv_timespec *tv, uint64_t ns)
 {
        struct timespec t;
        clock_gettime(CLOCK_MONOTONIC, &t);
-       tv->tv_sec = t.tv_sec + ns / 1000000000;
-       tv->tv_nsec = t.tv_nsec + ns % 1000000000;
+       tv->tv_sec = t.tv_sec + ns / NSEC_PER_SEC;
+       tv->tv_nsec = t.tv_nsec + ns % NSEC_PER_SEC;
 }
 
 #if HAVE_VALGRIND