PCI: Remove arch-specific IORESOURCE_ROM_SHADOW size from sysfs
authorBjorn Helgaas <bhelgaas@google.com>
Sat, 12 Mar 2016 11:48:08 +0000 (05:48 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Sat, 12 Mar 2016 12:00:25 +0000 (06:00 -0600)
commitac0c302a919ba7b68dbf274babdc08c83df6f532
treec694008d5ac975145b5f0ff4074cd0147f0c1ad9
parent0c0e0736acad4e76e718456c75d78ad95eea0011
PCI: Remove arch-specific IORESOURCE_ROM_SHADOW size from sysfs

When pci_create_sysfs_dev_files() created the "rom" sysfs file, it set the
sysfs file size to the actual size of a ROM BAR, or if there was no ROM BAR
but the platform provided a shadow copy in RAM, to 0x20000.  0x20000 is an
arch-specific length that should not be baked into the PCI core.

Every place that sets IORESOURCE_ROM_SHADOW also sets the size of the
PCI_ROM_RESOURCE, so use the resource length always.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci-sysfs.c