]> sigrok.org Git - libsigrok.git/blobdiff - src/usb.c
Doxygen: Properly mark a few symbols as private.
[libsigrok.git] / src / usb.c
index c4d5567399de247148e4fd7a289e575686073129..93286e8ad8289419ceaebb8b7069a1dd476db864 100644 (file)
--- a/src/usb.c
+++ b/src/usb.c
@@ -38,7 +38,6 @@ typedef int libusb_os_handle;
 #endif
 
 /** Custom GLib event source for libusb I/O.
- * @internal
  */
 struct usb_source {
        GSource base;
@@ -184,7 +183,7 @@ static LIBUSB_CALL void usb_pollfd_added(libusb_os_handle fd,
                return;
 
        pollfd = g_slice_new(GPollFD);
-#ifdef G_OS_WIN32
+#ifdef _WIN32
        events = G_IO_IN;
 #endif
        pollfd->fd = (gintptr)fd;
@@ -329,8 +328,7 @@ SR_PRIV GSList *sr_usb_find(libusb_context *usb_ctx, const char *conn)
                if ((mstr = g_match_info_fetch(match, 2)))
                        pid = strtoul(mstr, NULL, 16);
                g_free(mstr);
-               sr_dbg("Trying to find USB device with VID:PID = %04x:%04x.",
-                      vid, pid);
+               /* Trying to find USB device via VID:PID. */
        } else {
                g_match_info_unref(match);
                g_regex_unref(reg);
@@ -343,8 +341,7 @@ SR_PRIV GSList *sr_usb_find(libusb_context *usb_ctx, const char *conn)
                        if ((mstr = g_match_info_fetch(match, 2)))
                                addr = strtoul(mstr, NULL, 10);
                        g_free(mstr);
-                       sr_dbg("Trying to find USB device with bus.address = "
-                              "%d.%d.", bus, addr);
+                       /* Trying to find USB device via bus.address. */
                }
        }
        g_match_info_unref(match);
@@ -386,13 +383,12 @@ SR_PRIV GSList *sr_usb_find(libusb_context *usb_ctx, const char *conn)
                sr_dbg("Found USB device (VID:PID = %04x:%04x, bus.address = "
                       "%d.%d).", des.idVendor, des.idProduct, b, a);
 
-               usb = sr_usb_dev_inst_new(libusb_get_bus_number(devlist[i]),
-                               libusb_get_device_address(devlist[i]), NULL);
+               usb = sr_usb_dev_inst_new(b, a, NULL);
                devices = g_slist_append(devices, usb);
        }
        libusb_free_device_list(devlist, 1);
 
-       sr_dbg("Found %d device(s).", g_slist_length(devices));
+       /* No log message for #devices found (caller will log that). */
 
        return devices;
 }
@@ -512,7 +508,7 @@ SR_PRIV int usb_get_port_path(libusb_device *dev, char *path, int path_len)
 }
 
 /**
- * Check the USB configuration to determine if this device has a given 
+ * Check the USB configuration to determine if this device has a given
  * manufacturer and product string.
  *
  * @return TRUE if the device's configuration profile strings