Skip to content

Commit

Permalink
PCI/ACPI: Remove acpi_root_driver in reverse order
Browse files Browse the repository at this point in the history
Call the sub-driver .remove() methods in the reverse order of the
.add() methods for symmetry.

[bhelgaas: changelog]
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>
  • Loading branch information
Yinghai Lu authored and Bjorn Helgaas committed Nov 3, 2012
1 parent 13b6a91 commit f426cef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/pci_root.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f426cef

Please sign in to comment.