Browse Source

Make sure to do full avalon_init if the device_fd is invalid.

Con Kolivas 13 years ago
parent
commit
6e9bbf236a
1 changed files with 4 additions and 1 deletions
  1. 4 1
      driver-avalon.c

+ 4 - 1
driver-avalon.c

@@ -650,7 +650,10 @@ static bool avalon_prepare(struct thr_info *thr)
 	struct cgpu_info *avalon = thr->cgpu;
 	struct timeval now;
 
-	__avalon_init(avalon);
+	if (avalon->device_fd == -1)
+		avalon_init(avalon);
+	else
+		__avalon_init(avalon);
 
 	gettimeofday(&now, NULL);
 	get_datestamp(avalon->init, &now);