diff options
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
-rw-r--r-- | drivers/pci/pci-sysfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index cd913a2a416f..29676fe4f23e 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -620,7 +620,8 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev) | |||
620 | goto err_bin_file; | 620 | goto err_bin_file; |
621 | 621 | ||
622 | /* If the device has a ROM, try to expose it in sysfs. */ | 622 | /* If the device has a ROM, try to expose it in sysfs. */ |
623 | if (pci_resource_len(pdev, PCI_ROM_RESOURCE)) { | 623 | if (pci_resource_len(pdev, PCI_ROM_RESOURCE) || |
624 | (pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW)) { | ||
624 | rom_attr = kzalloc(sizeof(*rom_attr), GFP_ATOMIC); | 625 | rom_attr = kzalloc(sizeof(*rom_attr), GFP_ATOMIC); |
625 | if (rom_attr) { | 626 | if (rom_attr) { |
626 | pdev->rom_attr = rom_attr; | 627 | pdev->rom_attr = rom_attr; |
@@ -695,4 +696,4 @@ static int __init pci_sysfs_init(void) | |||
695 | return 0; | 696 | return 0; |
696 | } | 697 | } |
697 | 698 | ||
698 | __initcall(pci_sysfs_init); | 699 | late_initcall(pci_sysfs_init); |