aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/aacraid/linit.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 9b9062f02462..d183a072a9d7 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -574,7 +574,15 @@ static ssize_t aac_show_model(struct class_device *class_dev,
574 struct aac_dev *dev = (struct aac_dev*)class_to_shost(class_dev)->hostdata; 574 struct aac_dev *dev = (struct aac_dev*)class_to_shost(class_dev)->hostdata;
575 int len; 575 int len;
576 576
577 len = snprintf(buf, PAGE_SIZE, "%s\n", 577 if (dev->supplement_adapter_info.AdapterTypeText[0]) {
578 char * cp = dev->supplement_adapter_info.AdapterTypeText;
579 while (*cp && *cp != ' ')
580 ++cp;
581 while (*cp == ' ')
582 ++cp;
583 len = snprintf(buf, PAGE_SIZE, "%s\n", cp);
584 } else
585 len = snprintf(buf, PAGE_SIZE, "%s\n",
578 aac_drivers[dev->cardtype].model); 586 aac_drivers[dev->cardtype].model);
579 return len; 587 return len;
580} 588}
@@ -585,7 +593,15 @@ static ssize_t aac_show_vendor(struct class_device *class_dev,
585 struct aac_dev *dev = (struct aac_dev*)class_to_shost(class_dev)->hostdata; 593 struct aac_dev *dev = (struct aac_dev*)class_to_shost(class_dev)->hostdata;
586 int len; 594 int len;
587 595
588 len = snprintf(buf, PAGE_SIZE, "%s\n", 596 if (dev->supplement_adapter_info.AdapterTypeText[0]) {
597 char * cp = dev->supplement_adapter_info.AdapterTypeText;
598 while (*cp && *cp != ' ')
599 ++cp;
600 len = snprintf(buf, PAGE_SIZE, "%.*s\n",
601 (int)(cp - (char *)dev->supplement_adapter_info.AdapterTypeText),
602 dev->supplement_adapter_info.AdapterTypeText);
603 } else
604 len = snprintf(buf, PAGE_SIZE, "%s\n",
589 aac_drivers[dev->cardtype].vname); 605 aac_drivers[dev->cardtype].vname);
590 return len; 606 return len;
591} 607}