Browse Source

Remove unused HAVE_LISBUSB macro and use USE_USBUTILS everywhere.

nfactor-troky
ckolivas 11 years ago committed by Con Kolivas
parent
commit
0f42fd3f46
  1. 6
      cgminer.c
  2. 2
      miner.h

6
cgminer.c

@ -6862,7 +6862,7 @@ static void clean_up(void)
#ifdef HAVE_OPENCL #ifdef HAVE_OPENCL
clear_adl(nDevs); clear_adl(nDevs);
#endif #endif
#ifdef HAVE_LIBUSB #ifdef USE_USBUTILS
libusb_exit(NULL); libusb_exit(NULL);
#endif #endif
@ -7483,18 +7483,16 @@ int main(int argc, char *argv[])
initial_args[i] = strdup(argv[i]); initial_args[i] = strdup(argv[i]);
initial_args[argc] = NULL; initial_args[argc] = NULL;
#ifdef HAVE_LIBUSB #ifdef USE_USBUTILS
int err = libusb_init(NULL); int err = libusb_init(NULL);
if (err) { if (err) {
fprintf(stderr, "libusb_init() failed err %d", err); fprintf(stderr, "libusb_init() failed err %d", err);
fflush(stderr); fflush(stderr);
quit(1, "libusb_init() failed"); quit(1, "libusb_init() failed");
} }
#ifdef USE_USBUTILS
mutex_init(&cgusb_lock); mutex_init(&cgusb_lock);
mutex_init(&cgusbres_lock); mutex_init(&cgusbres_lock);
cglock_init(&cgusb_fd_lock); cglock_init(&cgusb_fd_lock);
#endif
#endif #endif
mutex_init(&hash_lock); mutex_init(&hash_lock);

2
miner.h

@ -117,7 +117,7 @@ static inline int fsync (int fd)
#include "ADL_SDK/adl_sdk.h" #include "ADL_SDK/adl_sdk.h"
#endif #endif
#ifdef HAVE_LIBUSB #ifdef USE_USBUTILS
#include <libusb.h> #include <libusb.h>
#endif #endif

Loading…
Cancel
Save