Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[muen/linux.git] / drivers / input / misc / uinput.c
index 91df0df15e685f813db27d822b50bc2a43ca1f4d..f640c591ef23fde4a6b753976917983e5f057e75 100644 (file)
@@ -84,11 +84,14 @@ static int uinput_dev_event(struct input_dev *dev,
                            unsigned int type, unsigned int code, int value)
 {
        struct uinput_device    *udev = input_get_drvdata(dev);
+       struct timespec64       ts;
 
        udev->buff[udev->head].type = type;
        udev->buff[udev->head].code = code;
        udev->buff[udev->head].value = value;
-       do_gettimeofday(&udev->buff[udev->head].time);
+       ktime_get_ts64(&ts);
+       udev->buff[udev->head].input_event_sec = ts.tv_sec;
+       udev->buff[udev->head].input_event_usec = ts.tv_nsec / NSEC_PER_USEC;
        udev->head = (udev->head + 1) % UINPUT_BUFFER_SIZE;
 
        wake_up_interruptible(&udev->waitq);
@@ -1085,4 +1088,3 @@ MODULE_ALIAS("devname:" UINPUT_NAME);
 MODULE_AUTHOR("Aristeu Sergio Rozanski Filho");
 MODULE_DESCRIPTION("User level driver support for input subsystem");
 MODULE_LICENSE("GPL");
-MODULE_VERSION("0.3");