|
@@ -34,6 +34,7 @@
|
|
|
#include <linux/kref.h>
|
|
|
#include <linux/device.h>
|
|
|
#include <linux/input.h>
|
|
|
+#include <linux/time64.h>
|
|
|
|
|
|
/* Driver identification */
|
|
|
#define DRIVER_NAME "ibmasm"
|
|
@@ -53,9 +54,11 @@ extern int ibmasm_debug;
|
|
|
|
|
|
static inline char *get_timestamp(char *buf)
|
|
|
{
|
|
|
- struct timeval now;
|
|
|
- do_gettimeofday(&now);
|
|
|
- sprintf(buf, "%lu.%lu", now.tv_sec, now.tv_usec);
|
|
|
+ struct timespec64 now;
|
|
|
+
|
|
|
+ ktime_get_real_ts64(&now);
|
|
|
+ sprintf(buf, "%llu.%.08lu", (long long)now.tv_sec,
|
|
|
+ now.tv_nsec / NSEC_PER_USEC);
|
|
|
return buf;
|
|
|
}
|
|
|
|