|
@@ -1408,8 +1408,8 @@ mpt_verify_adapter(int iocid, MPT_ADAPTER **iocpp)
|
|
|
* in /proc/mpt/summary and /sysfs/class/scsi_host/host<X>/version_product
|
|
|
*
|
|
|
**/
|
|
|
-static void
|
|
|
-mpt_get_product_name(u16 vendor, u16 device, u8 revision, char *prod_name)
|
|
|
+static const char*
|
|
|
+mpt_get_product_name(u16 vendor, u16 device, u8 revision)
|
|
|
{
|
|
|
char *product_str = NULL;
|
|
|
|
|
@@ -1635,8 +1635,7 @@ mpt_get_product_name(u16 vendor, u16 device, u8 revision, char *prod_name)
|
|
|
}
|
|
|
|
|
|
out:
|
|
|
- if (product_str)
|
|
|
- sprintf(prod_name, "%s", product_str);
|
|
|
+ return product_str;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1887,8 +1886,8 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
|
|
|
dinitprintk(ioc, printk(MYIOC_s_INFO_FMT "facts @ %p, pfacts[0] @ %p\n",
|
|
|
ioc->name, &ioc->facts, &ioc->pfacts[0]));
|
|
|
|
|
|
- mpt_get_product_name(pdev->vendor, pdev->device, pdev->revision,
|
|
|
- ioc->prod_name);
|
|
|
+ ioc->prod_name = mpt_get_product_name(pdev->vendor, pdev->device,
|
|
|
+ pdev->revision);
|
|
|
|
|
|
switch (pdev->device)
|
|
|
{
|