]> sigrok.org Git - libsigrok.git/commitdiff
usb: strip overly verbose debugging
authorBert Vermeulen <redacted>
Sun, 9 Dec 2012 14:19:39 +0000 (15:19 +0100)
committerBert Vermeulen <redacted>
Sat, 15 Dec 2012 03:07:25 +0000 (04:07 +0100)
hardware/common/usb.c

index 9a38c089ef8630883d4e7637d64504d94023178f..3da583218ca6ff02921831b80607a6b2af5e8ec2 100644 (file)
@@ -144,7 +144,7 @@ SR_PRIV int sr_usb_open(libusb_context *usb_ctx, struct sr_usb_dev_inst *usb)
        struct libusb_device_descriptor des;
        int ret, r, cnt, i, a, b;
 
-       sr_dbg("Trying to open USB device.");
+       sr_dbg("Trying to open USB device %d.%d.", usb->bus, usb->address);
 
        if ((cnt = libusb_get_device_list(usb_ctx, &devlist)) < 0) {
                sr_err("Failed to retrieve device list: %s.",
@@ -162,11 +162,8 @@ SR_PRIV int sr_usb_open(libusb_context *usb_ctx, struct sr_usb_dev_inst *usb)
 
                b = libusb_get_bus_number(devlist[i]);
                a = libusb_get_device_address(devlist[i]);
-
-               if (b != usb->bus || a != usb->address) {
-                       sr_spew("bus.address = %d.%d does not match.", b, a);
+               if (b != usb->bus || a != usb->address)
                        continue;
-               }
 
                if ((r = libusb_open(devlist[i], &usb->devhdl)) < 0) {
                        sr_err("Failed to open device: %s.",