summaryrefslogtreecommitdiff
path: root/libusb/os/windows_winusb.h
diff options
context:
space:
mode:
authorChris Dickens <christopher.a.dickens@gmail.com>2016-09-13 22:09:50 -0700
committerNathan Hjelm <hjelmn@me.com>2016-10-01 06:59:11 -0600
commit9bf44223d4c0eabbfbf8f9e979767fe424008ec0 (patch)
tree16b527975845968eb8c087e93a553f9115120c23 /libusb/os/windows_winusb.h
parent4eca418ef50dcaf3f2fca11158410acd72e8e2e2 (diff)
downloadlibusb-9bf44223d4c0eabbfbf8f9e979767fe424008ec0.tar.gz
Windows: Fix possible false error message during device enumerationv1.0.21-rc6
During early phases of enumeration, it is possible for a device to be enumerated before its parent. When this occurs, the device assigned as the parent will actually be a grandparent. During later phases of enumeration, the parent device will in fact exist but will not match what has already been assigned to the device. This commit adds code to check for and update the parent device when this situation occurs. Closes #206 Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'libusb/os/windows_winusb.h')
-rw-r--r--libusb/os/windows_winusb.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/libusb/os/windows_winusb.h b/libusb/os/windows_winusb.h
index 49c1df5..a259374 100644
--- a/libusb/os/windows_winusb.h
+++ b/libusb/os/windows_winusb.h
@@ -201,7 +201,6 @@ struct windows_device_priv {
uint8_t depth; // distance to HCD
uint8_t port; // port number on the hub
uint8_t active_config;
- struct libusb_device *parent_dev; // access to parent is required for usermode ops
struct windows_usb_api_backend const *apib;
char *path; // device interface path
int sub_api; // for WinUSB-like APIs
@@ -231,7 +230,6 @@ static inline struct windows_device_priv *windows_device_priv_init(struct libusb
p->depth = 0;
p->port = 0;
- p->parent_dev = NULL;
p->path = NULL;
p->apib = &usb_api_backend[USB_API_UNSUPPORTED];
p->sub_api = SUB_API_NOTSET;