Remove unused HAVE_LISBUSB macro and use USE_USBUTILS everywhere.
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 38 39 40 41 42 43 44 45 46 47
diff --git a/cgminer.c b/cgminer.c
index 1f5eb2c..2c02bae 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -6862,7 +6862,7 @@ static void clean_up(void)
#ifdef HAVE_OPENCL
clear_adl(nDevs);
#endif
-#ifdef HAVE_LIBUSB
+#ifdef USE_USBUTILS
libusb_exit(NULL);
#endif
@@ -7483,19 +7483,17 @@ int main(int argc, char *argv[])
initial_args[i] = strdup(argv[i]);
initial_args[argc] = NULL;
-#ifdef HAVE_LIBUSB
+#ifdef USE_USBUTILS
int err = libusb_init(NULL);
if (err) {
fprintf(stderr, "libusb_init() failed err %d", err);
fflush(stderr);
quit(1, "libusb_init() failed");
}
-#ifdef USE_USBUTILS
mutex_init(&cgusb_lock);
mutex_init(&cgusbres_lock);
cglock_init(&cgusb_fd_lock);
#endif
-#endif
mutex_init(&hash_lock);
mutex_init(&console_lock);
diff --git a/miner.h b/miner.h
index 0f28e72..852ec1a 100644
--- a/miner.h
+++ b/miner.h
@@ -117,7 +117,7 @@ static inline int fsync (int fd)
#include "ADL_SDK/adl_sdk.h"
#endif
-#ifdef HAVE_LIBUSB
+#ifdef USE_USBUTILS
#include <libusb.h>
#endif