@@ -175,10 +175,6 @@ static int input_thr_id;
175
175
int gpur_thr_id ;
176
176
static int api_thr_id ;
177
177
static int total_control_threads ;
178
- bool hotplug_mode ;
179
- static int new_devices ;
180
- static int new_threads ;
181
- int hotplug_time = 5 ;
182
178
183
179
#if LOCK_TRACKING
184
180
pthread_mutex_t lockstat_lock ;
@@ -7842,17 +7838,11 @@ void enable_device(struct cgpu_info *cgpu)
7842
7838
devices [cgpu -> sgminer_id = sgminer_id_count ++ ] = cgpu ;
7843
7839
wr_unlock (& devices_lock );
7844
7840
7845
- if (hotplug_mode ) {
7846
- new_threads += cgpu -> threads ;
7841
+ mining_threads += cgpu -> threads ;
7847
7842
#ifdef HAVE_CURSES
7848
- adj_width (mining_threads + new_threads , & dev_width );
7843
+ adj_width (mining_threads , & dev_width );
7849
7844
#endif
7850
- } else {
7851
- mining_threads += cgpu -> threads ;
7852
- #ifdef HAVE_CURSES
7853
- adj_width (mining_threads , & dev_width );
7854
- #endif
7855
- }
7845
+
7856
7846
if (cgpu -> drv -> drv_id == DRIVER_opencl ) {
7857
7847
gpu_threads += cgpu -> threads ;
7858
7848
}
@@ -7888,17 +7878,14 @@ bool add_cgpu(struct cgpu_info *cgpu)
7888
7878
}
7889
7879
7890
7880
wr_lock (& devices_lock );
7891
- devices = (struct cgpu_info * * )realloc (devices , sizeof (struct cgpu_info * ) * (total_devices + new_devices + 2 ));
7881
+ devices = (struct cgpu_info * * )realloc (devices , sizeof (struct cgpu_info * ) * (total_devices + 2 ));
7892
7882
wr_unlock (& devices_lock );
7893
7883
7894
7884
mutex_lock (& stats_lock );
7895
7885
cgpu -> last_device_valid_work = time (NULL );
7896
7886
mutex_unlock (& stats_lock );
7897
7887
7898
- if (hotplug_mode )
7899
- devices [total_devices + new_devices ++ ] = cgpu ;
7900
- else
7901
- devices [total_devices ++ ] = cgpu ;
7888
+ devices [total_devices ++ ] = cgpu ;
7902
7889
7903
7890
adjust_mostdevs ();
7904
7891
return true;
0 commit comments