Browse Source

lowlevel: Convey device manufacturer up to nanofury cgpus

Luke Dashjr 12 years ago
parent
commit
15f30dc089
4 changed files with 4 additions and 1 deletions
  1. 1 1
      driver-nanofury.c
  2. 1 0
      lowlevel.c
  3. 1 0
      lowlevel.h
  4. 1 0
      mcp2210.c

+ 1 - 1
driver-nanofury.c

@@ -201,7 +201,7 @@ bool nanofury_foundlowl(struct lowlevel_device_info * const info)
 		.threads = 1,
 		.threads = 1,
 		// TODO: .name
 		// TODO: .name
 		.device_path = strdup(info->path),
 		.device_path = strdup(info->path),
-		// TODO: .dev_manufacturer
+		.dev_manufacturer = strdup(info->manufacturer),
 		.dev_product = strdup(product),
 		.dev_product = strdup(product),
 		.dev_serial = strdup(serial),
 		.dev_serial = strdup(serial),
 		.deven = DEV_ENABLED,
 		.deven = DEV_ENABLED,

+ 1 - 0
lowlevel.c

@@ -22,6 +22,7 @@ void lowlevel_devinfo_free(struct lowlevel_device_info * const info)
 {
 {
 	if (info->lowl->devinfo_free)
 	if (info->lowl->devinfo_free)
 		info->lowl->devinfo_free(info);
 		info->lowl->devinfo_free(info);
+	free(info->manufacturer);
 	free(info->product);
 	free(info->product);
 	free(info->serial);
 	free(info->serial);
 	free(info->path);
 	free(info->path);

+ 1 - 0
lowlevel.h

@@ -13,6 +13,7 @@ struct lowlevel_driver {
 };
 };
 
 
 struct lowlevel_device_info {
 struct lowlevel_device_info {
+	char *manufacturer;
 	char *product;
 	char *product;
 	char *serial;
 	char *serial;
 	char *path;
 	char *path;

+ 1 - 0
mcp2210.c

@@ -177,6 +177,7 @@ struct lowlevel_device_info *mcp2210_devinfo_scan()
 		*info = (struct lowlevel_device_info){
 		*info = (struct lowlevel_device_info){
 			.lowl = &lowl_mcp2210,
 			.lowl = &lowl_mcp2210,
 			.path = strdup(hid_item->path),
 			.path = strdup(hid_item->path),
+			.manufacturer = wcs2str_dup(hid_item->manufacturer_string),
 			.product = wcs2str_dup(hid_item->product_string),
 			.product = wcs2str_dup(hid_item->product_string),
 			.serial  = wcs2str_dup(hid_item->serial_number),
 			.serial  = wcs2str_dup(hid_item->serial_number),
 		};
 		};