summaryrefslogtreecommitdiffstats
path: root/libs/usb
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-03-27 14:22:47 +0000
committerNarayan Kamath <narayan@google.com>2014-03-27 14:22:47 +0000
commitecd072161ec57ba8dfb26659511c0f6605601560 (patch)
tree5ed526d3b7f3a1c6532c90fca9bb57c8364e589a /libs/usb
parentafd8b17fa1fc15d06dc4ade7fc365e0a157c9b53 (diff)
parent22d074643ed0d010ebfdb0fca685d65eb2632e58 (diff)
downloadframeworks_base-ecd072161ec57ba8dfb26659511c0f6605601560.zip
frameworks_base-ecd072161ec57ba8dfb26659511c0f6605601560.tar.gz
frameworks_base-ecd072161ec57ba8dfb26659511c0f6605601560.tar.bz2
resolved conflicts for merge of 22d07464 to master
Change-Id: Ic037261eedd6e224938c960d2b4597590c81ed9d
Diffstat (limited to 'libs/usb')
-rw-r--r--libs/usb/tests/AccessoryChat/accessorychat/accessorychat.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/usb/tests/AccessoryChat/accessorychat/accessorychat.c b/libs/usb/tests/AccessoryChat/accessorychat/accessorychat.c
index 06b477f..57c0320 100644
--- a/libs/usb/tests/AccessoryChat/accessorychat/accessorychat.c
+++ b/libs/usb/tests/AccessoryChat/accessorychat/accessorychat.c
@@ -32,7 +32,7 @@
struct usb_device *sDevice = NULL;
static void* read_thread(void* arg) {
- int endpoint = (int)arg;
+ int endpoint = (int)(uintptr_t)arg;
int ret = 0;
while (sDevice && ret >= 0) {
@@ -52,7 +52,7 @@ static void* read_thread(void* arg) {
}
static void* write_thread(void* arg) {
- int endpoint = (int)arg;
+ int endpoint = (int)(uintptr_t)arg;
int ret = 0;
while (ret >= 0) {
@@ -136,11 +136,11 @@ static int usb_device_added(const char *devname, void* client_data) {
}
if ((ep1->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) {
- pthread_create(&th, NULL, read_thread, (void *)ep1->bEndpointAddress);
- pthread_create(&th, NULL, write_thread, (void *)ep2->bEndpointAddress);
+ pthread_create(&th, NULL, read_thread, (void *)(uintptr_t)ep1->bEndpointAddress);
+ pthread_create(&th, NULL, write_thread, (void *)(uintptr_t)ep2->bEndpointAddress);
} else {
- pthread_create(&th, NULL, read_thread, (void *)ep2->bEndpointAddress);
- pthread_create(&th, NULL, write_thread, (void *)ep1->bEndpointAddress);
+ pthread_create(&th, NULL, read_thread, (void *)(uintptr_t)ep2->bEndpointAddress);
+ pthread_create(&th, NULL, write_thread, (void *)(uintptr_t)ep1->bEndpointAddress);
}
} else {
printf("Found possible android device - attempting to switch to accessory mode\n");