ACPI: Pass segment/bus to _PRT add/del so they don't depend on pci_bus
This effectively reverts 859a3f86ca8 ("ACPI: simplify
acpi_pci_irq_add_prt() API") and d9efae3688a ("ACPI: simplify
acpi_pci_irq_del_prt() API").
The reason is to disentangle these routines from the struct pci_bus.
We want to be able to add the _PRT before the struct pci_bus
exists, and delete the _PRT after we've removed the pci_bus.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 012f40d..db31eda 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -554,7 +554,8 @@
*/
status = acpi_get_handle(device->handle, METHOD_NAME__PRT, &handle);
if (ACPI_SUCCESS(status))
- result = acpi_pci_irq_add_prt(device->handle, root->bus);
+ result = acpi_pci_irq_add_prt(device->handle, root->segment,
+ root->secondary.start);
/*
* Scan and bind all _ADR-Based Devices
@@ -682,7 +683,7 @@
status = acpi_get_handle(device->handle, METHOD_NAME__PRT, &handle);
if (ACPI_SUCCESS(status))
- acpi_pci_irq_del_prt(root->bus);
+ acpi_pci_irq_del_prt(root->segment, root->secondary.start);
pci_remove_root_bus(root->bus);