|
@@ -210,6 +210,8 @@ static void pcibios_allocate_bridge_resources(struct pci_dev *dev)
|
|
|
r = &dev->resource[idx];
|
|
|
if (!r->flags)
|
|
|
continue;
|
|
|
+ if (r->parent) /* Already allocated */
|
|
|
+ continue;
|
|
|
if (!r->start || pci_claim_resource(dev, idx) < 0) {
|
|
|
/*
|
|
|
* Something is wrong with the region.
|
|
@@ -318,6 +320,8 @@ static void pcibios_allocate_dev_rom_resource(struct pci_dev *dev)
|
|
|
r = &dev->resource[PCI_ROM_RESOURCE];
|
|
|
if (!r->flags || !r->start)
|
|
|
return;
|
|
|
+ if (r->parent) /* Already allocated */
|
|
|
+ return;
|
|
|
|
|
|
if (pci_claim_resource(dev, PCI_ROM_RESOURCE) < 0) {
|
|
|
r->end -= r->start;
|