do usb_initialise() after the started message so we see it
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/cgminer.c b/cgminer.c
index 7b29b7c..5a9b8c9 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -7048,6 +7048,9 @@ int main(int argc, char *argv[])
fflush(stderr);
quit(1, "libusb_init() failed");
}
+#ifdef USE_USBUTILS
+ mutex_init(&cgusb_lock);
+#endif
#endif
mutex_init(&hash_lock);
@@ -7135,11 +7138,6 @@ int main(int argc, char *argv[])
if (argc != 1)
quit(1, "Unexpected extra commandline arguments");
-#ifdef USE_USBUTILS
- mutex_init(&cgusb_lock);
- usb_initialise();
-#endif
-
if (!config_loaded)
load_default_config();
@@ -7189,6 +7187,10 @@ int main(int argc, char *argv[])
if (want_per_device_stats)
opt_log_output = true;
+#ifdef USE_USBUTILS
+ usb_initialise();
+#endif
+
#ifdef WANT_CPUMINE
#ifdef USE_SCRYPT
if (opt_scrypt)