From 7549fd80dceb76179c8bba85df341a74e670d373 Mon Sep 17 00:00:00 2001 From: hselasky Date: Fri, 24 Jun 2011 11:14:09 +0000 Subject: - Add two new API's to libusb20 which can be used to retrive information about the parent USB device: - libusb20_dev_get_parent_address - libusb20_dev_get_parent_port - Rename libusb20_compat01.c into libusb01.c MFC after: 3 days --- lib/libusb/libusb20_ugen20.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/libusb/libusb20_ugen20.c') diff --git a/lib/libusb/libusb20_ugen20.c b/lib/libusb/libusb20_ugen20.c index 933d728..307ed96 100644 --- a/lib/libusb/libusb20_ugen20.c +++ b/lib/libusb/libusb20_ugen20.c @@ -195,6 +195,11 @@ ugen20_enumerate(struct libusb20_device *pdev, const char *id) break; } + /* get parent HUB index and port */ + + pdev->parent_address = devinfo.udi_hubindex; + pdev->parent_port = devinfo.udi_hubport; + /* generate a nice description for printout */ snprintf(pdev->usb_desc, sizeof(pdev->usb_desc), -- cgit v1.1