Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f426cef3 authored by Yinghai Lu's avatar Yinghai Lu Committed by Bjorn Helgaas
Browse files

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: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 13b6a916
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -672,7 +672,7 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type)
	pci_stop_root_bus(root->bus);
	pci_stop_root_bus(root->bus);


	mutex_lock(&acpi_pci_root_lock);
	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)
		if (driver->remove)
			driver->remove(root);
			driver->remove(root);
	mutex_unlock(&acpi_pci_root_lock);
	mutex_unlock(&acpi_pci_root_lock);