ACPI: Pass segment/bus to _PRT add/del so they don't depend on pci_bus
This effectively reverts859a3f86ca
("ACPI: simplify acpi_pci_irq_add_prt() API") andd9efae3688
("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>
This commit is contained in:
@@ -554,7 +554,8 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
|
||||
*/
|
||||
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 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type)
|
||||
|
||||
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);
|
||||
|
||||
|
Reference in New Issue
Block a user