Skip to content

Commit 42caa0e

Browse files
James Bottomleymartinkpetersen
authored andcommitted
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: 702ed3b (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>
1 parent 8437fcf commit 42caa0e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/scsi/aic94xx/aic94xx_init.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ static ssize_t asd_show_dev_rev(struct device *dev,
280280
return snprintf(buf, PAGE_SIZE, "%s\n",
281281
asd_dev_rev[asd_ha->revision_id]);
282282
}
283-
static DEVICE_ATTR(revision, S_IRUGO, asd_show_dev_rev, NULL);
283+
static DEVICE_ATTR(aic_revision, S_IRUGO, asd_show_dev_rev, NULL);
284284

285285
static ssize_t asd_show_dev_bios_build(struct device *dev,
286286
struct device_attribute *attr,char *buf)
@@ -477,7 +477,7 @@ static int asd_create_dev_attrs(struct asd_ha_struct *asd_ha)
477477
{
478478
int err;
479479

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);
481481
if (err)
482482
return err;
483483

@@ -499,13 +499,13 @@ static int asd_create_dev_attrs(struct asd_ha_struct *asd_ha)
499499
err_biosb:
500500
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build);
501501
err_rev:
502-
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_revision);
502+
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision);
503503
return err;
504504
}
505505

506506
static void asd_remove_dev_attrs(struct asd_ha_struct *asd_ha)
507507
{
508-
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_revision);
508+
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_aic_revision);
509509
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_bios_build);
510510
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_pcba_sn);
511511
device_remove_file(&asd_ha->pcidev->dev, &dev_attr_update_bios);

0 commit comments

Comments
 (0)