Browse Source

bitforce: Fix bitforce_chips_to_plan_for to work beyond 32 chips

Luke Dashjr 11 years ago
parent
commit
da67b8c3ee
1 changed files with 1 additions and 6 deletions
  1. 1 6
      driver-bitforce.c

+ 1 - 6
driver-bitforce.c

@@ -417,12 +417,7 @@ static
 int bitforce_chips_to_plan_for(int parallel, int chipcount) {
 int bitforce_chips_to_plan_for(int parallel, int chipcount) {
 	if (parallel < 1)
 	if (parallel < 1)
 		return parallel;
 		return parallel;
-	if (chipcount > 15) return 32;
-	if (chipcount >  7) return 16;
-	if (chipcount >  3) return  8;
-	if (chipcount >  1) return  4;
-	if (chipcount     ) return  2;
-	                    return  1;
+	return upper_power_of_two_u32(chipcount);
 }
 }
 
 
 static
 static