]> sigrok.org Git - libsigrok.git/commitdiff
chronovu-la: Silence overly verbose log message.
authorUwe Hermann <redacted>
Tue, 12 Sep 2017 20:15:32 +0000 (22:15 +0200)
committerUwe Hermann <redacted>
Tue, 12 Sep 2017 20:15:32 +0000 (22:15 +0200)
This triggered all kinds of unrelated / confusing log messages
for unrelated hardware devices, e.g.:

  sr: [00:00.613080] chronovu-la: Unknown iProduct string 'USB-based Instrument'.
  sr: [00:00.614374] chronovu-la: Unknown iProduct string 'GL3220      '.
  sr: [00:00.614907] chronovu-la: Unknown iProduct string 'USB 3.0 HUB      '.
  sr: [00:00.615558] chronovu-la: Unknown iProduct string 'USB 2.0 HUB      '.
  sr: [00:00.619846] chronovu-la: Unknown iProduct string 'Bluetooth USB Host Controller'.
  sr: [00:00.620411] chronovu-la: Unknown iProduct string 'USB 3.0 HUB      '.
  sr: [00:00.624293] chronovu-la: Unknown iProduct string 'UAC1 DAC'.
  sr: [00:00.627849] chronovu-la: Unknown iProduct string 'BRCM20702 Hub'.
  sr: [00:00.628640] chronovu-la: Unknown iProduct string 'USB 2.0 HUB      '.
  sr: [00:00.674777] chronovu-la: Unknown iProduct string 'USB2223'.
  sr: [00:00.675034] chronovu-la: Unknown iProduct string ''.
  sr: [00:00.675180] chronovu-la: Unknown iProduct string ''.
  sr: [00:00.675205] hwdriver: Scan found 0 devices (chronovu-la).

src/hardware/chronovu-la/api.c

index a20697a347d070e65d2cde834b448d787f030bc9..3d19b4f06941ce4b20f51a4b6d63a3d0b387651e 100644 (file)
@@ -196,14 +196,12 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
 
                libusb_close(hdl);
 
-               if (!strcmp(product, "ChronoVu LA8")) {
+               if (!strcmp(product, "ChronoVu LA8"))
                        model = 0;
-               } else if (!strcmp(product, "ChronoVu LA16")) {
+               else if (!strcmp(product, "ChronoVu LA16"))
                        model = 1;
-               } else {
-                       sr_spew("Unknown iProduct string '%s'.", product);
-                       continue;
-               }
+               else
+                       continue; /* Unknown iProduct string, ignore. */
 
                sr_dbg("Found %s (%04x:%04x, %d.%d, %s).",
                       product, des.idVendor, des.idProduct,