Browse Source

Move devtype default assignment to allocate_cgpu

Luke Dashjr 12 years ago
parent
commit
22c2ce6b0b
1 changed files with 3 additions and 4 deletions
  1. 3 4
      miner.c

+ 3 - 4
miner.c

@@ -8620,6 +8620,9 @@ void allocate_cgpu(struct cgpu_info *cgpu, unsigned int *kp)
 	int j;
 	
 	struct device_drv *api = cgpu->drv;
+	if (!cgpu->devtype)
+		cgpu->devtype = "PGA";
+	
 	int threadobj = cgpu->threads;
 	if (!threadobj)
 		// Create a fake thread object to handle hashmeter etc
@@ -8955,10 +8958,6 @@ int main(int argc, char *argv[])
 
 	drv_detect_all();
 
-	for (i = 0; i < total_devices; ++i)
-		if (!devices[i]->devtype)
-			devices[i]->devtype = "PGA";
-
 	if (opt_display_devs) {
 		applog(LOG_ERR, "Devices detected:");
 		for (i = 0; i < total_devices; ++i) {