Commit 30e7040f118850cf264a9bbdde6bd9a252ac6330

Kano 2013-03-09T13:56:52

usb_cleanup() without locking

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/usbutils.c b/usbutils.c
index 5222685..7aed305 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -1567,8 +1567,12 @@ void usb_cleanup()
 	struct cgpu_info *cgpu;
 	int i;
 
+	hotplug_time = 0;
+
+	nmsleep(10);
+
 	for (i = 0; i < total_devices; i++) {
-		cgpu = get_devices(i);
+		cgpu = devices[i];
 		switch (cgpu->drv->drv_id) {
 			case DRIVER_BFLSC:
 			case DRIVER_BITFORCE: