Merge "Remove useless arguments from is_adb_interface." am: bd6c6eb0e4 am: db50d1d6ef
am: 0a629b4bdd
Change-Id: I54e47bf9d8e056255335e809b9733e2597b3e532
diff --git a/adb/adb.h b/adb/adb.h
index 8064c17..2797f6b 100644
--- a/adb/adb.h
+++ b/adb/adb.h
@@ -202,7 +202,7 @@
// USB device detection.
#if ADB_HOST
-int is_adb_interface(int vid, int pid, int usb_class, int usb_subclass, int usb_protocol);
+int is_adb_interface(int usb_class, int usb_subclass, int usb_protocol);
#endif
ConnectionState connection_state(atransport *t);
diff --git a/adb/transport_usb.cpp b/adb/transport_usb.cpp
index d05d928..d054601 100644
--- a/adb/transport_usb.cpp
+++ b/adb/transport_usb.cpp
@@ -94,7 +94,7 @@
}
#if ADB_HOST
-int is_adb_interface(int vid, int pid, int usb_class, int usb_subclass, int usb_protocol)
+int is_adb_interface(int usb_class, int usb_subclass, int usb_protocol)
{
return (usb_class == ADB_CLASS && usb_subclass == ADB_SUBCLASS && usb_protocol == ADB_PROTOCOL);
}
diff --git a/adb/usb_linux.cpp b/adb/usb_linux.cpp
index 500898a..3e5028d 100644
--- a/adb/usb_linux.cpp
+++ b/adb/usb_linux.cpp
@@ -205,9 +205,8 @@
interface->bInterfaceProtocol, interface->bNumEndpoints);
if (interface->bNumEndpoints == 2 &&
- is_adb_interface(vid, pid, interface->bInterfaceClass,
- interface->bInterfaceSubClass, interface->bInterfaceProtocol)) {
-
+ is_adb_interface(interface->bInterfaceClass, interface->bInterfaceSubClass,
+ interface->bInterfaceProtocol)) {
struct stat st;
char pathbuf[128];
char link[256];
diff --git a/adb/usb_osx.cpp b/adb/usb_osx.cpp
index adcbb3e..2ee2aae 100644
--- a/adb/usb_osx.cpp
+++ b/adb/usb_osx.cpp
@@ -345,7 +345,7 @@
//* check to make sure interface class, subclass and protocol match ADB
//* avoid opening mass storage endpoints
- if (!is_adb_interface(vendor, product, interfaceClass, interfaceSubClass, interfaceProtocol)) {
+ if (!is_adb_interface(interfaceClass, interfaceSubClass, interfaceProtocol)) {
goto err_bad_adb_interface;
}
diff --git a/adb/usb_windows.cpp b/adb/usb_windows.cpp
index 4649454..755f07e 100644
--- a/adb/usb_windows.cpp
+++ b/adb/usb_windows.cpp
@@ -553,10 +553,9 @@
return 0;
}
- if (is_adb_interface(device_desc.idVendor, device_desc.idProduct,
- interf_desc.bInterfaceClass, interf_desc.bInterfaceSubClass, interf_desc.bInterfaceProtocol)) {
-
- if(interf_desc.bInterfaceProtocol == 0x01) {
+ if (is_adb_interface(interf_desc.bInterfaceClass, interf_desc.bInterfaceSubClass,
+ interf_desc.bInterfaceProtocol)) {
+ if (interf_desc.bInterfaceProtocol == 0x01) {
AdbEndpointInformation endpoint_info;
// assuming zero is a valid bulk endpoint ID
if (AdbGetEndpointInformation(handle->adb_interface, 0, &endpoint_info)) {