Browse Source

bitmain: Implement inc_dev_status within record_temp_fan

Luke Dashjr 10 years ago
parent
commit
17510dff7c
2 changed files with 7 additions and 1 deletions
  1. 5 1
      driver-bitmain.c
  2. 2 0
      driver-bitmain.h

+ 5 - 1
driver-bitmain.c

@@ -1167,7 +1167,11 @@ static inline void record_temp_fan(struct bitmain_info *info, struct bitmain_rxs
 		info->temp_avg = *temp_avg;
 	}
 
-	inc_dev_status(maxfan, maxtemp);
+	// inc_dev_status
+	mutex_lock(&stats_lock);
+	info->g_max_fan = maxfan;
+	info->g_max_temp = maxtemp;
+	mutex_unlock(&stats_lock);
 }
 
 static void bitmain_update_temps(struct cgpu_info *bitmain, struct bitmain_info *info,

+ 2 - 0
driver-bitmain.h

@@ -291,6 +291,8 @@ struct bitmain_info {
 	bool optimal;
 	
 	char g_miner_version[256];
+	int g_max_fan;
+	int g_max_temp;
 };
 
 #define BITMAIN_READ_SIZE 12