summaryrefslogtreecommitdiffstats
path: root/libs/ui/EventHub.cpp
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2010-01-26 10:27:15 -0800
committerNick Pelly <npelly@google.com>2010-01-26 10:28:52 -0800
commitc8b60d1932bb9f294550584126fc5b58a6312406 (patch)
tree0c27776ee9b05f09a0ad306c7ad6e65961f94169 /libs/ui/EventHub.cpp
parent996dddff64f90d8469e24107c44bfd618cf0c2dd (diff)
downloadframeworks_base-c8b60d1932bb9f294550584126fc5b58a6312406.zip
frameworks_base-c8b60d1932bb9f294550584126fc5b58a6312406.tar.gz
frameworks_base-c8b60d1932bb9f294550584126fc5b58a6312406.tar.bz2
Revert "Fix failure to open AVRCP input device due to EPERM."
This reverts commit e6b1bbd8acca3f6e174c24cf4eb23a66db2d08a2.
Diffstat (limited to 'libs/ui/EventHub.cpp')
-rw-r--r--libs/ui/EventHub.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/libs/ui/EventHub.cpp b/libs/ui/EventHub.cpp
index 4aac455..c4d4f99 100644
--- a/libs/ui/EventHub.cpp
+++ b/libs/ui/EventHub.cpp
@@ -489,7 +489,6 @@ int EventHub::open_device(const char *deviceName)
{
int version;
int fd;
- int attempt;
struct pollfd *new_mFDs;
device_t **new_devices;
char **new_device_names;
@@ -502,16 +501,11 @@ int EventHub::open_device(const char *deviceName)
AutoMutex _l(mLock);
- for (attempt = 0; attempt < 10; attempt++) {
- fd = open(deviceName, O_RDWR);
- if (fd >= 0) break;
- usleep(100);
- }
+ fd = open(deviceName, O_RDWR);
if(fd < 0) {
LOGE("could not open %s, %s\n", deviceName, strerror(errno));
return -1;
}
- LOGV("Opened device: %s (%d failures)", deviceName, attempt);
if(ioctl(fd, EVIOCGVERSION, &version)) {
LOGE("could not get driver version for %s, %s\n", deviceName, strerror(errno));