Commit 691a681f7e229e8961f79aa234a228f07b00cfa7

Con Kolivas 2013-10-26T20:24:51

Remove inappropriate extra locking in _usb_transfer_read

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/usbutils.c b/usbutils.c
index 3e32b81..17c1d74 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -2978,10 +2978,8 @@ int _usb_transfer_read(struct cgpu_info *cgpu, uint8_t request_type, uint8_t bRe
 	}
 	memset(tbuf, 0, 64);
 	STATS_TIMEVAL(&tv_start);
-	cg_rlock(&cgusb_fd_lock);
 	err = usb_control_transfer(cgpu, usbdev->handle, request_type, bRequest,
 				   wValue, wIndex, tbuf, (uint16_t)bufsiz, timeout);
-	cg_runlock(&cgusb_fd_lock);
 	STATS_TIMEVAL(&tv_finish);
 	USB_STATS(cgpu, &tv_start, &tv_finish, err, MODE_CTRL_READ, cmd, SEQ0, timeout);
 	memcpy(buf, tbuf, bufsiz);