|
@@ -92,7 +92,6 @@ static void BFwrite(int fd, const void *buf, ssize_t bufLen)
|
|
|
static bool bitforce_detect_one(const char *devpath)
|
|
static bool bitforce_detect_one(const char *devpath)
|
|
|
{
|
|
{
|
|
|
char pdevbuf[0x100];
|
|
char pdevbuf[0x100];
|
|
|
- static int i = 0;
|
|
|
|
|
|
|
|
|
|
if (total_devices == MAX_DEVICES)
|
|
if (total_devices == MAX_DEVICES)
|
|
|
return false;
|
|
return false;
|
|
@@ -117,14 +116,11 @@ static bool bitforce_detect_one(const char *devpath)
|
|
|
// We have a real BitForce!
|
|
// We have a real BitForce!
|
|
|
struct cgpu_info *bitforce;
|
|
struct cgpu_info *bitforce;
|
|
|
bitforce = calloc(1, sizeof(*bitforce));
|
|
bitforce = calloc(1, sizeof(*bitforce));
|
|
|
- devices[total_devices++] = bitforce;
|
|
|
|
|
bitforce->api = &bitforce_api;
|
|
bitforce->api = &bitforce_api;
|
|
|
- bitforce->device_id = i++;
|
|
|
|
|
bitforce->device_path = strdup(devpath);
|
|
bitforce->device_path = strdup(devpath);
|
|
|
bitforce->deven = DEV_ENABLED;
|
|
bitforce->deven = DEV_ENABLED;
|
|
|
bitforce->threads = 1;
|
|
bitforce->threads = 1;
|
|
|
-
|
|
|
|
|
- return true;
|
|
|
|
|
|
|
+ return add_cgpu(bitforce);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static bool bitforce_detect_auto_udev()
|
|
static bool bitforce_detect_auto_udev()
|