Commit 8f4547da998274167dda8113fa2380d0fc594813

Kano 2013-05-17T22:05:53

usbutils add rest of icarus

diff --git a/usbutils.c b/usbutils.c
index a2663d4..f11c790 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -1677,16 +1677,16 @@ static struct usb_find_devices *usb_check(__maybe_unused struct device_drv *drv,
 		return usb_check_each(DRV_BITFORCE, drv, dev);
 #endif
 
-#ifdef USE_ICARUS
-	if (drv->drv_id == DRIVER_ICARUS)
-		return usb_check_each(DRV_ICARUS, drv, dev);
-#endif
-
 #ifdef USE_MODMINER
 	if (drv->drv_id == DRIVER_MODMINER)
 		return usb_check_each(DRV_MODMINER, drv, dev);
 #endif
 
+#ifdef USE_ICARUS
+	if (drv->drv_id == DRIVER_ICARUS)
+		return usb_check_each(DRV_ICARUS, drv, dev);
+#endif
+
 #ifdef USE_AVALON
 	if (drv->drv_id == DRIVER_AVALON)
 		return usb_check_each(DRV_AVALON, drv, dev);
@@ -2193,6 +2193,7 @@ void usb_cleanup()
 			case DRIVER_BFLSC:
 			case DRIVER_BITFORCE:
 			case DRIVER_MODMINER:
+			case DRIVER_ICARUS:
 			case DRIVER_AVALON:
 				release_cgpu(cgpu);
 				break;
@@ -2301,6 +2302,12 @@ void usb_initialise()
 					found = true;
 				}
 #endif
+#ifdef USE_ICARUS
+				if (!found && strcasecmp(ptr, icarus_drv.name) == 0) {
+					drv_count[icarus_drv.drv_id].limit = lim;
+					found = true;
+				}
+#endif
 #ifdef USE_AVALON
 				if (!found && strcasecmp(ptr, avalon_drv.name) == 0) {
 					drv_count[avalon_drv.drv_id].limit = lim;