upgrade iop32x to 2.6.30
[openwrt.git] / target / linux / goldfish / patches-2.6.30 / 0088-Input-Use-monotonic-time-for-event-time-stamps.patch
1 From 474db0e1425f8da03a7d49ebba1602efa503c73f Mon Sep 17 00:00:00 2001
2 From: =?utf-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com>
3 Date: Fri, 17 Oct 2008 15:28:08 -0700
4 Subject: [PATCH 088/134] Input: Use monotonic time for event time stamps.
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=utf-8
7 Content-Transfer-Encoding: 8bit
8
9 Since wall time can jump backwards, it cannot be used to determine if one
10 event occured before another or for how long a key was pressed.
11
12 Signed-off-by: Arve Hjønnevåg <arve@android.com>
13 ---
14 drivers/input/evdev.c | 5 ++++-
15 1 files changed, 4 insertions(+), 1 deletions(-)
16
17 --- a/drivers/input/evdev.c
18 +++ b/drivers/input/evdev.c
19 @@ -74,8 +74,11 @@ static void evdev_event(struct input_han
20 struct evdev *evdev = handle->private;
21 struct evdev_client *client;
22 struct input_event event;
23 + struct timespec ts;
24
25 - do_gettimeofday(&event.time);
26 + ktime_get_ts(&ts);
27 + event.time.tv_sec = ts.tv_sec;
28 + event.time.tv_usec = ts.tv_nsec / NSEC_PER_USEC;
29 event.type = type;
30 event.code = code;
31 event.value = value;
This page took 0.061812 seconds and 5 git commands to generate.