diff options
| author | Arve Hjønnevåg <arve@android.com> | 2008-10-17 15:28:08 -0700 |
|---|---|---|
| committer | John Stultz <john.stultz@linaro.org> | 2012-05-21 16:04:39 -0700 |
| commit | dc96eaf91604ea028d400ca752d63eac3254a50e (patch) | |
| tree | 6e75d9924ef220d2813839ee8bb4fd7020486f00 | |
| parent | 5459bf85d84b6d719e03d56ff70637cbc8f14941 (diff) | |
Input: Use monotonic time for event time stamps.
Since wall time can jump backwards, it cannot be used to determine if one
event occured before another or for how long a key was pressed.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
[jstultz: Reworked to deal with new clkid switch. Until userland
catches up, set all clkids to monotonic]
Signed-off-by: John Stultz <john.stultz@linaro.org>
| -rw-r--r-- | drivers/input/evdev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index a93743879c0..5e943b18f61 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -323,6 +323,8 @@ static int evdev_open(struct inode *inode, struct file *file) goto err_put_evdev; } + client->clkid = CLOCK_MONOTONIC; + client->bufsize = bufsize; spin_lock_init(&client->buffer_lock); snprintf(client->name, sizeof(client->name), "%s-%d", |
