Browse Source

Use the info timeout for read_nl in getidentify bflsc.

Con Kolivas 12 years ago
parent
commit
0cd2c5c3c8
2 changed files with 2 additions and 2 deletions
  1. 1 1
      driver-bflsc.c
  2. 1 1
      usbutils.h

+ 1 - 1
driver-bflsc.c

@@ -910,7 +910,7 @@ reinit:
 		goto unshin;
 	}
 
-	err = usb_read_nl(bflsc, buf, sizeof(buf)-1, &amount, C_GETIDENTIFY);
+	err = usb_read_nl_timeout(bflsc, buf, sizeof(buf)-1, &amount, BFLSC_INFO_TIMEOUT, C_GETIDENTIFY);
 	if (err < 0 || amount < 1) {
 		init_count++;
 		cgtime(&init_now);

+ 1 - 1
usbutils.h

@@ -315,7 +315,7 @@ void *usb_resource_thread(void *userdata);
 #define usb_read_nl(cgpu, buf, bufsiz, read, cmd) \
 	_usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, DEVTIMEOUT, "\n", cmd, false)
 
-#define usb_read_nl_timeout(cgpu, buf, bufsiz, read, timeotu, cmd) \
+#define usb_read_nl_timeout(cgpu, buf, bufsiz, read, timeout, cmd) \
 	_usb_read(cgpu, DEFAULT_EP_IN, buf, bufsiz, read, timeout, "\n", cmd, false)
 
 #define usb_read_ok(cgpu, buf, bufsiz, read, cmd) \