From fb287ec5f5c5ed38b4661d3c1810b6ef82867ff1 Mon Sep 17 00:00:00 2001 From: Edward Fewell Date: Tue, 5 Jun 2018 11:17:40 -0500 Subject: [PATCH] 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 Reviewed-on: http://openocd.zylin.com/4553 Reviewed-by: Tomas Vanek Tested-by: jenkins --- src/jtag/drivers/xds110.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/jtag/drivers/xds110.c b/src/jtag/drivers/xds110.c index 9bfe02ea8..b97eef29d 100644 --- a/src/jtag/drivers/xds110.c +++ b/src/jtag/drivers/xds110.c @@ -365,13 +365,9 @@ static bool usb_connect(void) xds110.ctx = ctx; 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); -#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 */ result = libusb_claim_interface(dev, INTERFACE_DEBUG); } else {