summaryrefslogtreecommitdiff
path: root/services/input/EventHub.cpp
diff options
context:
space:
mode:
author Jeff Brown <jeffbrown@google.com> 2012-05-01 18:41:26 -0700
committer Jeff Brown <jeffbrown@google.com> 2012-05-01 18:41:26 -0700
commita75fe05b6e0728ada82cd18dc3ac1ae3a61a10fb (patch)
tree348ba26557db84e165c32abeee6027153b56edd2 /services/input/EventHub.cpp
parentdaa3753a04699724d2cfe824ac1f5a266d643a05 (diff)
Use EVIOCSCLOCKID correctly.
Bug: 6382031 Change-Id: I87b0887ce867a79758bcd24e2202280270faaf8c
Diffstat (limited to 'services/input/EventHub.cpp')
-rw-r--r--services/input/EventHub.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/input/EventHub.cpp b/services/input/EventHub.cpp
index 6ec020cb9319..f80ac18450ca 100644
--- a/services/input/EventHub.cpp
+++ b/services/input/EventHub.cpp
@@ -1194,7 +1194,8 @@ status_t EventHub::openDeviceLocked(const char *devicePath) {
// As of Linux 3.4, there is a new EVIOCSCLOCKID ioctl to set the desired clock.
// Therefore, we no longer require the Android-specific kernel patch described above
// as long as we make sure to set select the monotonic clock. We do that here.
- bool usingClockIoctl = !ioctl(fd, EVIOCSCLOCKID, CLOCK_MONOTONIC);
+ int clockId = CLOCK_MONOTONIC;
+ bool usingClockIoctl = !ioctl(fd, EVIOCSCLOCKID, &clockId);
ALOGI("New device: id=%d, fd=%d, path='%s', name='%s', classes=0x%x, "
"configuration='%s', keyLayout='%s', keyCharacterMap='%s', builtinKeyboard=%s, "