From: Yinghai Lu Date: Tue, 30 Oct 2012 20:31:52 +0000 (-0600) Subject: PCI/ACPI: Remove acpi_root_driver in reverse order X-Git-Tag: MMI-PSA29.97-13-9~15390^2~13^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f426cef3bc58806284e0fee55d29262b10279f9c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git PCI/ACPI: Remove acpi_root_driver in reverse order Call the sub-driver .remove() methods in the reverse order of the .add() methods for symmetry. [bhelgaas: changelog] Signed-off-by: Yinghai Lu Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index a27cbb572fe1..012f40d1d75d 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -672,7 +672,7 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type) pci_stop_root_bus(root->bus); mutex_lock(&acpi_pci_root_lock); - list_for_each_entry(driver, &acpi_pci_drivers, node) + list_for_each_entry_reverse(driver, &acpi_pci_drivers, node) if (driver->remove) driver->remove(root); mutex_unlock(&acpi_pci_root_lock);