aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2019-01-30 19:42:12 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2019-02-01 18:04:07 -0500
commit42caa0edabd6a0a392ec36a5f0943924e4954311 (patch)
treeb3058139942db0c7b68bc9daba22df0a2f66752f
parent8437fcf14deed67e5ad90b5e8abf62fb20f30881 (diff)
scsi: aic94xx: fix module loading
The aic94xx driver is currently failing to load with errors like sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:03.0/0000:02:00.3/0000:07:02.0/revision' Because the PCI code had recently added a file named 'revision' to every PCI device. Fix this by renaming the aic94xx revision file to aic_revision. This is safe to do for us because as far as I can tell, there's nothing in userspace relying on the current aic94xx revision file so it can be renamed without breaking anything. Fixes: 702ed3be1b1b (PCI: Create revision file in sysfs) Cc: stable@vger.kernel.org Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/aic94xx/aic94xx_init.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
index f83f79b07b50..07efcb9b5b94 100644
--- a/drivers/scsi/aic94xx/aic94xx_init.c
+++ b/drivers/scsi/aic94xx/aic94xx_init.c
@@ -280,7 +280,7 @@ static ssize_t asd_show_dev_rev(struct device *dev,
280 return snprintf(buf, PAGE_SIZE, "%s\n", 280 return snprintf(buf, PAGE_SIZE, "%s\n",
281 asd_dev_rev[asd_ha->revision_id]); 281 asd_dev_rev[asd_ha->revision_id]);
282} 282}
283static DEVICE_ATTR(revision, S_IRUGO, asd_show_dev_rev, NULL); 283static DEVICE_ATTR(aic_revision, S_IRUGO, asd_show_dev_rev, NULL);
284 284
285static ssize_t asd_show_dev_bios_build(struct device *dev, 285static ssize_t asd_show_dev_bios_build(struct device *dev,
286 struct device_attribute *attr,char *buf) 286 struct device_attribute *attr,char *buf)
@@ -477,7 +477,7 @@ static int asd_create_dev_attrs(struct asd_ha_struct *asd_ha)
477{ 477{
478 int err; 478 int err;
479 479
480 err = device_create_file(&asd_ha->pcidev->dev, &dev_attr_revision); 480 err = device_create_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision);
481 if (err) 481 if (err)
482 return err; 482 return err;
483 483
@@ -499,13 +499,13 @@ err_update_bios:
499err_biosb: 499err_biosb:
500 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build); 500 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build);
501err_rev: 501err_rev:
502 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_revision); 502 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision);
503 return err; 503 return err;
504} 504}
505 505
506static void asd_remove_dev_attrs(struct asd_ha_struct *asd_ha) 506static void asd_remove_dev_attrs(struct asd_ha_struct *asd_ha)
507{ 507{
508 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_revision); 508 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision);
509 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build); 509 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build);
510 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_pcba_sn); 510 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_pcba_sn);
511 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_update_bios); 511 device_remove_file(&asd_ha->pcidev->dev, &dev_attr_update_bios);