Browse Source

Move have_libusb checks out of drv_detect_all

Luke Dashjr 12 years ago
parent
commit
67fbf59cb4
2 changed files with 5 additions and 2 deletions
  1. 3 0
      driver-ztex.c
  2. 2 2
      miner.c

+ 3 - 0
driver-ztex.c

@@ -112,6 +112,9 @@ static int ztex_autodetect(void)
 
 static void ztex_detect()
 {
+	if (!have_libusb)
+		return;
+	
 	// This wrapper ensures users can specify -S ztex:noauto to disable it
 	noserial_detect(&ztex_drv, ztex_autodetect);
 }

+ 2 - 2
miner.c

@@ -10256,12 +10256,12 @@ void drv_detect_all()
 #endif
 
 #ifdef USE_X6500
-	if (likely(have_libusb) && !opt_scrypt)
+	if (!opt_scrypt)
 		x6500_api.drv_detect();
 #endif
 
 #ifdef USE_ZTEX
-	if (likely(have_libusb) && !opt_scrypt)
+	if (!opt_scrypt)
 		ztex_drv.drv_detect();
 #endif