diff options
Diffstat (limited to 'arch/ia64')
| -rw-r--r-- | arch/ia64/pci/pci.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index d4e162d35b34..7cc3be9fa7c6 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
| @@ -478,9 +478,16 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) | |||
| 478 | 478 | ||
| 479 | int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) | 479 | int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) |
| 480 | { | 480 | { |
| 481 | struct pci_controller *controller = bridge->bus->sysdata; | 481 | /* |
| 482 | 482 | * We pass NULL as parent to pci_create_root_bus(), so if it is not NULL | |
| 483 | ACPI_COMPANION_SET(&bridge->dev, controller->companion); | 483 | * here, pci_create_root_bus() has been called by someone else and |
| 484 | * sysdata is likely to be different from what we expect. Let it go in | ||
| 485 | * that case. | ||
| 486 | */ | ||
| 487 | if (!bridge->dev.parent) { | ||
| 488 | struct pci_controller *controller = bridge->bus->sysdata; | ||
| 489 | ACPI_COMPANION_SET(&bridge->dev, controller->companion); | ||
| 490 | } | ||
| 484 | return 0; | 491 | return 0; |
| 485 | } | 492 | } |
| 486 | 493 | ||
