drivers: xds110: Remove unnecessary and deprecated libusb function.

libusb-1.0.22 has deprecated the libusb_set_debug function. This
function was present in the XDS110 driver as an artifact left over
from early debugging. It isn't required because logging is disabled
by default. Removing it to simplify the code and no longer need to
have libusb version specific #if's in the code.

Change-Id: I9c3f16c039da3f3fad9c4a1169978b0d85a1b45c
Signed-off-by: Edward Fewell <efewell@ti.com>
Reviewed-on: http://openocd.zylin.com/4553
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
This commit is contained in:
Edward Fewell 2018-06-05 11:17:40 -05:00 committed by Tomas Vanek
parent f1427cca3c
commit fb287ec5f5
1 changed files with 2 additions and 6 deletions

View File

@ -365,13 +365,9 @@ static bool usb_connect(void)
xds110.ctx = ctx; xds110.ctx = ctx;
xds110.dev = dev; xds110.dev = dev;
/* Set libusb to auto detach kernel and disable debug messages */ /* Set libusb to auto detach kernel */
(void)libusb_set_auto_detach_kernel_driver(dev, 1); (void)libusb_set_auto_detach_kernel_driver(dev, 1);
#if LIBUSB_API_VERSION >= 0x01000106
libusb_set_option(ctx, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_NONE);
#else
libusb_set_debug(ctx, LIBUSB_LOG_LEVEL_NONE);
#endif
/* Claim the debug interface on the XDS110 */ /* Claim the debug interface on the XDS110 */
result = libusb_claim_interface(dev, INTERFACE_DEBUG); result = libusb_claim_interface(dev, INTERFACE_DEBUG);
} else { } else {