Browse Source

Bugfix: bitfury: struct bitfury_device is already chip-specific

Luke Dashjr 12 years ago
parent
commit
86cd7da20a
2 changed files with 3 additions and 3 deletions
  1. 2 2
      driver-bitfury.c
  2. 1 1
      libbitfury.h

+ 2 - 2
driver-bitfury.c

@@ -492,7 +492,7 @@ int select_freq(struct bitfury_device *bitfury, struct cgpu_info *proc) {
 	struct freq_stat *c;
 	
 	chip_id = proc->device_id * 8 + proc->proc_id;
-	c = &(bitfury->chip_stat[chip_id]);
+	c = &bitfury->chip_stat;
 	
 	if (c->best_done) {
 		freq = c->best_osc;
@@ -690,7 +690,7 @@ void bitfury_do_io(struct thr_info * const master_thr)
 				struct freq_stat *c;
 				
 				chip_id = proc->device_id * 8 + proc->proc_id;
-				c = &(bitfury->chip_stat[chip_id]);
+				c = &bitfury->chip_stat;
 				applog(LOG_DEBUG, "AAA stat chip_id: %d total_secs: %f, omh: %f, os: %f",  chip_id, total_secs, c->omh, c->os);
 				// Copy current statistics
 				mh_diff = bitfury->counter2 - c->omh;

+ 1 - 1
libbitfury.h

@@ -47,7 +47,7 @@ struct bitfury_device {
 	struct bitfury_payload payload;
 	struct bitfury_payload opayload;
 	struct bitfury_payload o2payload;
-	struct freq_stat chip_stat[120];
+	struct freq_stat chip_stat;
 	unsigned int results[16];
 	int results_n;
 	time_t stat_ts[BITFURY_STAT_N];