1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-23 04:54:26 +00:00

set device_drv function noops when first add_cgpu

This commit is contained in:
Kano 2013-07-18 08:51:08 +10:00
parent 948f0057c4
commit a8c974f5f1

View File

@ -7152,8 +7152,6 @@ void enable_device(struct cgpu_info *cgpu)
gpu_threads += cgpu->threads; gpu_threads += cgpu->threads;
} }
#endif #endif
fill_device_drv(cgpu);
rwlock_init(&cgpu->qlock); rwlock_init(&cgpu->qlock);
cgpu->queued_work = NULL; cgpu->queued_work = NULL;
} }
@ -7196,6 +7194,8 @@ bool add_cgpu(struct cgpu_info *cgpu)
cgpu->last_device_valid_work = time(NULL); cgpu->last_device_valid_work = time(NULL);
mutex_unlock(&stats_lock); mutex_unlock(&stats_lock);
fill_device_drv(cgpu);
if (hotplug_mode) if (hotplug_mode)
devices[total_devices + new_devices++] = cgpu; devices[total_devices + new_devices++] = cgpu;
else else