diff options
author | Elliott Hughes <enh@google.com> | 2014-11-19 22:07:34 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-11-19 22:07:34 -0800 |
commit | 55664906a89058ae8d7521e20b24273508f6bf9b (patch) | |
tree | 7cd2683c73c8ee34f57587548f27c9eea6113dcf /adb/transport_usb.c | |
parent | 46ee85fcc301471aff9d95a817599349570dcef8 (diff) | |
download | system_core-55664906a89058ae8d7521e20b24273508f6bf9b.zip system_core-55664906a89058ae8d7521e20b24273508f6bf9b.tar.gz system_core-55664906a89058ae8d7521e20b24273508f6bf9b.tar.bz2 |
Disable vendor id filtering for Linux.
It's time we switched to blacklisting any problematic devices rather than
slowly whitelisting the entire world. This seems to work for me, but let's
see how other people get on before coming back to actually remove the list.
We'll also need to find a Mac to test the equivalent Mac change.
Change-Id: I2bf583a27f9a3f98ef006ea62b906a4f89960507
Diffstat (limited to 'adb/transport_usb.c')
-rw-r--r-- | adb/transport_usb.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/adb/transport_usb.c b/adb/transport_usb.c index ee6b637..3d19803 100644 --- a/adb/transport_usb.c +++ b/adb/transport_usb.c @@ -23,10 +23,6 @@ #define TRACE_TAG TRACE_TRANSPORT #include "adb.h" -#if ADB_HOST -#include "usb_vendors.h" -#endif - #ifdef HAVE_BIG_ENDIAN #define H4(x) (((x) & 0xFF000000) >> 24) | (((x) & 0x00FF0000) >> 8) | (((x) & 0x0000FF00) << 8) | (((x) & 0x000000FF) << 24) static inline void fix_endians(apacket *p) @@ -131,18 +127,6 @@ void init_usb_transport(atransport *t, usb_handle *h, int state) #if ADB_HOST int is_adb_interface(int vid, int pid, int usb_class, int usb_subclass, int usb_protocol) { - unsigned i; - for (i = 0; i < vendorIdCount; i++) { - if (vid == vendorIds[i]) { - if (usb_class == ADB_CLASS && usb_subclass == ADB_SUBCLASS && - usb_protocol == ADB_PROTOCOL) { - return 1; - } - - return 0; - } - } - - return 0; + return (usb_class == ADB_CLASS && usb_subclass == ADB_SUBCLASS && usb_protocol == ADB_PROTOCOL); } #endif |