aboutsummaryrefslogtreecommitdiff
path: root/lib/libusb/libusb20.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libusb/libusb20.c')
-rw-r--r--lib/libusb/libusb20.c44
1 files changed, 5 insertions, 39 deletions
diff --git a/lib/libusb/libusb20.c b/lib/libusb/libusb20.c
index f684bef0e7c7..6e0ec476f3d3 100644
--- a/lib/libusb/libusb20.c
+++ b/lib/libusb/libusb20.c
@@ -65,8 +65,6 @@ dummy_callback(struct libusb20_transfer *xfer)
#define dummy_get_config_desc_full (void *)dummy_int
#define dummy_get_config_index (void *)dummy_int
#define dummy_set_config_index (void *)dummy_int
-#define dummy_claim_interface (void *)dummy_int
-#define dummy_release_interface (void *)dummy_int
#define dummy_set_alt_index (void *)dummy_int
#define dummy_reset_device (void *)dummy_int
#define dummy_set_power_mode (void *)dummy_int
@@ -451,24 +449,6 @@ libusb20_tr_start(struct libusb20_transfer *xfer)
/* USB device operations */
int
-libusb20_dev_claim_interface(struct libusb20_device *pdev, uint8_t ifaceIndex)
-{
- int error;
-
- if (ifaceIndex >= 32) {
- error = LIBUSB20_ERROR_INVALID_PARAM;
- } else if (pdev->claimed_interfaces & (1 << ifaceIndex)) {
- error = LIBUSB20_ERROR_NOT_FOUND;
- } else {
- error = pdev->methods->claim_interface(pdev, ifaceIndex);
- }
- if (!error) {
- pdev->claimed_interfaces |= (1 << ifaceIndex);
- }
- return (error);
-}
-
-int
libusb20_dev_close(struct libusb20_device *pdev)
{
struct libusb20_transfer *xfer;
@@ -494,7 +474,11 @@ libusb20_dev_close(struct libusb20_device *pdev)
pdev->is_opened = 0;
- pdev->claimed_interfaces = 0;
+ /*
+ * The following variable is only used by the libusb v0.1
+ * compat layer:
+ */
+ pdev->claimed_interface = 0;
return (error);
}
@@ -580,24 +564,6 @@ libusb20_dev_open(struct libusb20_device *pdev, uint16_t nTransferMax)
}
int
-libusb20_dev_release_interface(struct libusb20_device *pdev, uint8_t ifaceIndex)
-{
- int error;
-
- if (ifaceIndex >= 32) {
- error = LIBUSB20_ERROR_INVALID_PARAM;
- } else if (!(pdev->claimed_interfaces & (1 << ifaceIndex))) {
- error = LIBUSB20_ERROR_NOT_FOUND;
- } else {
- error = pdev->methods->release_interface(pdev, ifaceIndex);
- }
- if (!error) {
- pdev->claimed_interfaces &= ~(1 << ifaceIndex);
- }
- return (error);
-}
-
-int
libusb20_dev_reset(struct libusb20_device *pdev)
{
int error;