summaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/uinput.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2018-02-01 00:37:30 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2018-02-01 00:37:30 -0800
commitd67ad78e09cbb9935c74a40b85c5abe5b9cd48f8 (patch)
tree56e92b487de80090a998ff3c0469375982156802 /drivers/input/misc/uinput.c
parent060403f34008af90e310d7e0e7531ebb3acf9557 (diff)
parentfafef982c7353e8982b951e40573e990ccf0ed00 (diff)
downloadblackbird-obmc-linux-d67ad78e09cbb9935c74a40b85c5abe5b9cd48f8.tar.gz
blackbird-obmc-linux-d67ad78e09cbb9935c74a40b85c5abe5b9cd48f8.zip
Merge branch 'next' into for-linus
Prepare input updates for 4.16 merge window.
Diffstat (limited to 'drivers/input/misc/uinput.c')
-rw-r--r--drivers/input/misc/uinput.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index 39ddd9a73feb..a94c5e05006b 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -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");
OpenPOWER on IntegriCloud