Browse Source

Bugfix: hashbuster2: Claim USB device internally

Luke Dashjr 12 years ago
parent
commit
ea6eda368e
1 changed files with 5 additions and 0 deletions
  1. 5 0
      driver-hashbuster2.c

+ 5 - 0
driver-hashbuster2.c

@@ -20,6 +20,7 @@
 #include "libbitfury.h"
 #include "logging.h"
 #include "lowlevel.h"
+#include "lowl-usb.h"
 #include "miner.h"
 
 #define HASHBUSTER_USB_PRODUCT "HashBuster"
@@ -200,6 +201,7 @@ bool hashbuster2_lowl_probe(const struct lowlevel_device_info * const info)
 	if (unlikely(!chip_n))
 	{
 		applog(LOG_WARNING, "%s: No chips found on %s", __func__, serial);
+fail:
 		free(port);
 		free(serial);
 		libusb_release_interface(h, 0);
@@ -207,6 +209,9 @@ bool hashbuster2_lowl_probe(const struct lowlevel_device_info * const info)
 		return false;
 	}
 	
+	if (bfg_claim_libusb(&hashbuster2_drv, true, dev))
+		goto fail;
+	
 	{
 		devicelist = malloc(sizeof(*devicelist) * chip_n);
 		for (j = 0; j < chip_n; ++j)