summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-10-30 21:31:43 +0100
committerBjorn Helgaas <bhelgaas@google.com>2012-11-03 23:26:37 +0100
commit9738a1fd214b8f617b31503307c79b6af72ee464 (patch)
treef746f47beac83d0266cd5a963a1041efd14517aa /drivers
parentPCI: Add pci_stop_and_remove_root_bus() (diff)
downloadlinux-9738a1fd214b8f617b31503307c79b6af72ee464.tar.xz
linux-9738a1fd214b8f617b31503307c79b6af72ee464.zip
PCI/ACPI: Make acpi_pci_root_remove() stop/remove pci root bus
It will call pci_stop_and_remove_bus() to stop/remove pci root bus. 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> CC: Len Brown <lenb@kernel.org> CC: linux-acpi@vger.kernel.org
Diffstat (limited to 'drivers')
-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 27adbfdffb0c..aed09537861a 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -667,14 +667,20 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type)
struct acpi_pci_root *root = acpi_driver_data(device);
struct acpi_pci_driver *driver;
+ pci_stop_root_bus(root->bus);
+
mutex_lock(&acpi_pci_root_lock);
list_for_each_entry(driver, &acpi_pci_drivers, node)
if (driver->remove)
driver->remove(root);
+ mutex_unlock(&acpi_pci_root_lock);
device_set_run_wake(root->bus->bridge, false);
pci_acpi_remove_bus_pm_notifier(device);
+ pci_remove_root_bus(root->bus);
+
+ mutex_lock(&acpi_pci_root_lock);
list_del(&root->node);
mutex_unlock(&acpi_pci_root_lock);
kfree(root);