Browse Source

Merge commit 'f8b66bd' into bfgminer

Luke Dashjr 13 years ago
parent
commit
3654a24746
3 changed files with 2 additions and 22 deletions
  1. 0 13
      adl.c
  2. 0 2
      adl.h
  3. 2 7
      miner.c

+ 0 - 13
adl.c

@@ -1379,17 +1379,4 @@ void clear_adl(int nDevs)
 	unlock_adl();
 	free_adl();
 }
-
-void reinit_adl(void)
-{
-	bool ret;
-	lock_adl();
-	free_adl();
-	ret = prepare_adl();
-	if (!ret) {
-		adl_active = false;
-		applog(LOG_WARNING, "Attempt to re-initialise ADL has failed, disabling");
-	}
-	unlock_adl();
-}
 #endif /* HAVE_ADL */

+ 0 - 2
adl.h

@@ -19,12 +19,10 @@ bool gpu_stats(int gpu, float *temp, int *engineclock, int *memclock, float *vdd
 void change_gpusettings(int gpu);
 void gpu_autotune(int gpu, enum dev_enable *denable);
 void clear_adl(int nDevs);
-void reinit_adl(void);
 #else /* HAVE_ADL */
 #define adl_active (0)
 static inline void init_adl(int nDevs) {}
 static inline void change_gpusettings(int gpu) { }
 static inline void clear_adl(int nDevs) {}
-static inline void reinit_adl(void) {}
 #endif
 #endif

+ 2 - 7
miner.c

@@ -396,6 +396,8 @@ static struct pool *add_pool(void)
 
 	/* Make sure the pool doesn't think we've been idle since time 0 */
 	pool->tv_idle.tv_sec = ~0UL;
+	pool->enabled = POOL_ENABLED;
+	pool->idle = true;
 
 	return pool;
 }
@@ -5096,13 +5098,6 @@ int main(int argc, char *argv[])
 	if (opt_benchmark)
 		goto begin_bench;
 
-	for (i = 0; i < total_pools; i++) {
-		struct pool *pool  = pools[i];
-
-		pool->enabled = POOL_ENABLED;
-		pool->idle = true;
-	}
-
 	applog(LOG_NOTICE, "Probing for an alive pool");
 	do {
 		/* Look for at least one active pool before starting */