summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Kilbourn <tkilbourn@google.com>2015-03-27 16:24:15 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-27 16:24:15 +0000
commit62535f09364f4f0a504ad222d8d72f6b6d97dafd (patch)
treeea96336add0b18fcf6a6793d2d702f02d5177ac7
parentc1c024a50c9b1cfd2c74d507de60ad4a52ca9dbd (diff)
parent3447df165f53d76791221531b769801741cfe04a (diff)
downloadnative-62535f09364f4f0a504ad222d8d72f6b6d97dafd.tar.gz
Merge "Use EPOLLWAKEUP properly."
-rw-r--r--services/inputflinger/EventHub.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/services/inputflinger/EventHub.cpp b/services/inputflinger/EventHub.cpp
index 93ce0103d2..313569237a 100644
--- a/services/inputflinger/EventHub.cpp
+++ b/services/inputflinger/EventHub.cpp
@@ -1293,7 +1293,10 @@ status_t EventHub::openDeviceLocked(const char *devicePath) {
// Register with epoll.
struct epoll_event eventItem;
memset(&eventItem, 0, sizeof(eventItem));
- eventItem.events = mUsingEpollWakeup ? EPOLLIN : EPOLLIN | EPOLLWAKEUP;
+ eventItem.events = EPOLLIN;
+ if (mUsingEpollWakeup) {
+ eventItem.events |= EPOLLWAKEUP;
+ }
eventItem.data.u32 = deviceId;
if (epoll_ctl(mEpollFd, EPOLL_CTL_ADD, fd, &eventItem)) {
ALOGE("Could not add device fd to epoll instance. errno=%d", errno);