mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Fill drivers missing reinit_device with a noop version.
This commit is contained in:
parent
3c91b292a2
commit
f2380eab4c
16
cgminer.c
16
cgminer.c
@ -5762,8 +5762,7 @@ out:
|
|||||||
|
|
||||||
void reinit_device(struct cgpu_info *cgpu)
|
void reinit_device(struct cgpu_info *cgpu)
|
||||||
{
|
{
|
||||||
if (cgpu->drv->reinit_device)
|
cgpu->drv->reinit_device(cgpu);
|
||||||
cgpu->drv->reinit_device(cgpu);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct timeval rotate_tv;
|
static struct timeval rotate_tv;
|
||||||
@ -6378,6 +6377,19 @@ extern struct device_drv ztex_drv;
|
|||||||
|
|
||||||
static int cgminer_id_count = 0;
|
static int cgminer_id_count = 0;
|
||||||
|
|
||||||
|
void noop_reinit_device(struct cgpu_info __maybe_unused *cgpu)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fill missing driver api functions with noops */
|
||||||
|
void fill_device_api(struct cgpu_info *cgpu)
|
||||||
|
{
|
||||||
|
struct device_drv *drv = cgpu->drv;
|
||||||
|
|
||||||
|
if (!drv->reinit_device)
|
||||||
|
drv->reinit_device = &noop_reinit_device;
|
||||||
|
}
|
||||||
|
|
||||||
void enable_device(struct cgpu_info *cgpu)
|
void enable_device(struct cgpu_info *cgpu)
|
||||||
{
|
{
|
||||||
cgpu->deven = DEV_ENABLED;
|
cgpu->deven = DEV_ENABLED;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user