summaryrefslogtreecommitdiff
path: root/drivers/acpi/pci_root.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-10-30 14:31:48 -0600
committerBjorn Helgaas <bhelgaas@google.com>2012-11-03 16:26:37 -0600
commit13b6a916409adbc47f3d13f9580be0bd413e446e (patch)
treec27e305d9f693dfc03ba822ab6e3f120dc3a070f /drivers/acpi/pci_root.c
parent9738a1fd214b8f617b31503307c79b6af72ee464 (diff)
PCI/ACPI: Delete host bridge _PRT during hot remove path
Corresponding to add path. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/pci_root.c')
-rw-r--r--drivers/acpi/pci_root.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index aed09537861a..a27cbb572fe1 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -664,6 +664,8 @@ static int acpi_pci_root_start(struct acpi_device *device)
static int acpi_pci_root_remove(struct acpi_device *device, int type)
{
+ acpi_status status;
+ acpi_handle handle;
struct acpi_pci_root *root = acpi_driver_data(device);
struct acpi_pci_driver *driver;
@@ -678,6 +680,10 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type)
device_set_run_wake(root->bus->bridge, false);
pci_acpi_remove_bus_pm_notifier(device);
+ status = acpi_get_handle(device->handle, METHOD_NAME__PRT, &handle);
+ if (ACPI_SUCCESS(status))
+ acpi_pci_irq_del_prt(root->bus);
+
pci_remove_root_bus(root->bus);
mutex_lock(&acpi_pci_root_lock);