aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi')
-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)
667 struct acpi_pci_root *root = acpi_driver_data(device); 667 struct acpi_pci_root *root = acpi_driver_data(device);
668 struct acpi_pci_driver *driver; 668 struct acpi_pci_driver *driver;
669 669
670 pci_stop_root_bus(root->bus);
671
670 mutex_lock(&acpi_pci_root_lock); 672 mutex_lock(&acpi_pci_root_lock);
671 list_for_each_entry(driver, &acpi_pci_drivers, node) 673 list_for_each_entry(driver, &acpi_pci_drivers, node)
672 if (driver->remove) 674 if (driver->remove)
673 driver->remove(root); 675 driver->remove(root);
676 mutex_unlock(&acpi_pci_root_lock);
674 677
675 device_set_run_wake(root->bus->bridge, false); 678 device_set_run_wake(root->bus->bridge, false);
676 pci_acpi_remove_bus_pm_notifier(device); 679 pci_acpi_remove_bus_pm_notifier(device);
677 680
681 pci_remove_root_bus(root->bus);
682
683 mutex_lock(&acpi_pci_root_lock);
678 list_del(&root->node); 684 list_del(&root->node);
679 mutex_unlock(&acpi_pci_root_lock); 685 mutex_unlock(&acpi_pci_root_lock);
680 kfree(root); 686 kfree(root);