diff options
author | Pete Batard <pete@akeo.ie> | 2012-01-07 23:28:30 +0000 |
---|---|---|
committer | Pete Batard <pete@akeo.ie> | 2012-01-07 23:28:30 +0000 |
commit | 6f2d9378a0d1d594461595f4d247348db252fe5d (patch) | |
tree | 0ea989260e6a73c51b071994d4c90e77408e929e /libusb | |
parent | 4cc72d0cfbeb8105af49e9026b8e365c963a69da (diff) | |
download | libusb-6f2d9378a0d1d594461595f4d247348db252fe5d.tar.gz |
[revert] "[core] is_device_interface_accessible() prototype"
This reverts commit 200fe7158aa6dda2940c6b6b7d4702a9173130a9.
Diffstat (limited to 'libusb')
-rw-r--r-- | libusb/core.c | 38 | ||||
-rw-r--r-- | libusb/libusb.h | 13 | ||||
-rw-r--r-- | libusb/libusbi.h | 13 | ||||
-rw-r--r-- | libusb/os/windows_usb.c | 6 |
4 files changed, 0 insertions, 70 deletions
diff --git a/libusb/core.c b/libusb/core.c index 8e56e92..3969fd5 100644 --- a/libusb/core.c +++ b/libusb/core.c @@ -1566,38 +1566,6 @@ int API_EXPORTED libusb_attach_kernel_driver(libusb_device_handle *dev, return LIBUSB_ERROR_NOT_SUPPORTED; } -/** \ingroup dev - * Determine if libusb can access a device or interface. - * - * \param dev a device handle - * \param interface_number the interface to check. On Windows, it is acceptable - * to pass a negative value as the interface number, for composite devices that - * have been split by the OS into multiple ones (MI_##), in which case the - * interface associated with the Windows device is assumed. - * Note that this routine does not protect against races: Even if an interface - * is reported as available, there is a possibility that another driver may - * already be using it by the time the program tries to claim it. - * \returns LIBUSB_SUCCESS if libusb can access the interface - * \returns LIBUSB_ERROR_DETACHEABLE_DRIVER_IN_USE if a libusb incompatible - * but detacheable driver is preventing access. See libusb_detach_kernel_driver. - * \returns LIBUSB_ERROR_NON_DETACHEABLE_DRIVER_IN_USE if a libusb incompatible - * and non detacheable driver is preventing access - * \returns LIBUSB_ERROR_NO_DRIVER on Windows if no driver has been installed - * for this device - * \returns LIBUSB_ERROR_NOT_SUPPORTED on platforms where the functionality - * is not available - * \returns another LIBUSB_ERROR code on other failure - */ -int LIBUSB_CALL libusb_is_device_interface_accessible(libusb_device_handle *dev, - int interface_number) -{ - usbi_dbg("interface %d", interface_number); - if (usbi_backend->is_device_interface_accessible) - return usbi_backend->is_device_interface_accessible(dev, interface_number); - else - return LIBUSB_ERROR_NOT_SUPPORTED; -} - /** \ingroup lib * Set message verbosity. * - Level 0: no messages ever printed by the library (default) @@ -1865,12 +1833,6 @@ const char * LIBUSB_CALL libusb_strerror(enum libusb_error error_code) return "Insufficient memory"; case LIBUSB_ERROR_NOT_SUPPORTED: return "Operation not supported or unimplemented on this platform"; - case LIBUSB_ERROR_DETACHABLE_DRIVER_IN_USE: - return "An incompatible driver is in use. This driver can be detached on request"; - case LIBUSB_ERROR_NON_DETACHABLE_DRIVER_IN_USE: - return "An incompatible and non detachable driver is in use. This driver should be replaced to allow libusb access"; - case LIBUSB_ERROR_NO_DRIVER: - return "No driver is installed. A libusb compatible driver must be installed to allow access"; case LIBUSB_ERROR_OTHER: return "Other error"; } diff --git a/libusb/libusb.h b/libusb/libusb.h index 05c5069..e29c9b8 100644 --- a/libusb/libusb.h +++ b/libusb/libusb.h @@ -760,16 +760,6 @@ enum libusb_error { /** Operation not supported or unimplemented on this platform */ LIBUSB_ERROR_NOT_SUPPORTED = -12, - // TODO: libusb_strerror - /** A detacheable kernel driver is in use */ - LIBUSB_ERROR_DETACHABLE_DRIVER_IN_USE = -13, - - /** A non-detacheable driver is in use */ - LIBUSB_ERROR_NON_DETACHABLE_DRIVER_IN_USE = -14, - - /** A driver has not been installed for this device (Windows) */ - LIBUSB_ERROR_NO_DRIVER = -15, - /** Other error */ LIBUSB_ERROR_OTHER = -99 @@ -973,9 +963,6 @@ int LIBUSB_CALL libusb_detach_kernel_driver(libusb_device_handle *dev, int LIBUSB_CALL libusb_attach_kernel_driver(libusb_device_handle *dev, int interface_number); -int LIBUSB_CALL libusb_is_device_interface_accessible(libusb_device_handle *dev, - int interface_number); - /* async I/O */ /** \ingroup asyncio diff --git a/libusb/libusbi.h b/libusb/libusbi.h index e449a2c..9651387 100644 --- a/libusb/libusbi.h +++ b/libusb/libusbi.h @@ -774,19 +774,6 @@ struct usbi_os_backend { int (*attach_kernel_driver)(struct libusb_device_handle *handle, int interface_number); - /* Determine if libusb can access a device or interface. - * - * Return: - * - LIBUSB_SUCCESS if libusb can access the interface - * - LIBUSB_ERROR_DETACHEABLE_DRIVER_IN_USE if a detacheable driver is in use - * - LIBUSB_ERROR_NON_DETACHEABLE_DRIVER_IN_USE if a libusb incompatible - * and non detacheable driver is in use - * - LIBUSB_ERROR_NO_DRIVER if no driver has been installed (Windows) - * - another LIBUSB_ERROR code on other failure - */ - int (*is_device_interface_accessible)(struct libusb_device_handle *handle, - int interface_number); - /* Destroy a device. Optional. * * This function is called when the last reference to a device is diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index 1d51e74..2922d54 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -1787,11 +1787,6 @@ static int windows_detach_kernel_driver(struct libusb_device_handle *dev_handle, return LIBUSB_ERROR_NOT_SUPPORTED; } -static int windows_is_device_interface_accessible(struct libusb_device_handle *handle, int iface) -{ - return LIBUSB_ERROR_NOT_SUPPORTED; -} - static void windows_destroy_device(struct libusb_device *dev) { windows_device_priv_release(dev); @@ -2186,7 +2181,6 @@ const struct usbi_os_backend windows_backend = { windows_kernel_driver_active, windows_detach_kernel_driver, windows_attach_kernel_driver, - windows_is_device_interface_accessible, windows_destroy_device, |