aboutsummaryrefslogtreecommitdiff
path: root/lib/libusb/libusb20_int.h
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2018-03-23 09:40:41 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2018-03-23 09:40:41 +0000
commitfd2ef04fdb3bac6e2fbcd02f380d1215716d06c5 (patch)
treef165c76a8e1954af570839d4040e5333bd21cf96 /lib/libusb/libusb20_int.h
parent266796e885807f714161259105e42fe1474e469d (diff)
downloadsrc-fd2ef04fdb3bac6e2fbcd02f380d1215716d06c5.tar.gz
src-fd2ef04fdb3bac6e2fbcd02f380d1215716d06c5.zip
Allow the libusb20_dev_get_port_path() function to be called when the
USB device is closed. This fixes a compatibility issue with upstream libusb. Found by: romain@ MFC after: 1 week
Notes
Notes: svn path=/head/; revision=331419
Diffstat (limited to 'lib/libusb/libusb20_int.h')
-rw-r--r--lib/libusb/libusb20_int.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libusb/libusb20_int.h b/lib/libusb/libusb20_int.h
index 9ba6359965b2..9c6b0138281d 100644
--- a/lib/libusb/libusb20_int.h
+++ b/lib/libusb/libusb20_int.h
@@ -107,7 +107,6 @@ typedef int (libusb20_process_t)(struct libusb20_device *pdev);
typedef int (libusb20_reset_device_t)(struct libusb20_device *pdev);
typedef int (libusb20_set_power_mode_t)(struct libusb20_device *pdev, uint8_t power_mode);
typedef int (libusb20_get_power_mode_t)(struct libusb20_device *pdev, uint8_t *power_mode);
-typedef int (libusb20_get_port_path_t)(struct libusb20_device *pdev, uint8_t *buf, uint8_t bufsize);
typedef int (libusb20_get_power_usage_t)(struct libusb20_device *pdev, uint16_t *power_usage);
typedef int (libusb20_set_alt_index_t)(struct libusb20_device *pdev, uint8_t iface_index, uint8_t alt_index);
typedef int (libusb20_set_config_index_t)(struct libusb20_device *pdev, uint8_t index);
@@ -131,7 +130,6 @@ typedef void (libusb20_tr_cancel_async_t)(struct libusb20_transfer *xfer);
m(n, check_connected) \
m(n, set_power_mode) \
m(n, get_power_mode) \
- m(n, get_port_path) \
m(n, get_power_usage) \
m(n, set_alt_index) \
m(n, set_config_index) \
@@ -237,8 +235,11 @@ struct libusb20_device {
uint8_t is_opened;
uint8_t parent_address;
uint8_t parent_port;
+ uint8_t port_level;
char usb_desc[96];
+#define LIBUSB20_DEVICE_PORT_PATH_MAX 32
+ uint8_t port_path[LIBUSB20_DEVICE_PORT_PATH_MAX];
};
extern const struct libusb20_backend_methods libusb20_ugen20_backend;