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

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

PCI/ACPI: Delete host bridge _PRT during hot remove path



Corresponding to add path.

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 9738a1fd
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -664,6 +664,8 @@ static int acpi_pci_root_start(struct acpi_device *device)


static int acpi_pci_root_remove(struct acpi_device *device, int type)
static int acpi_pci_root_remove(struct acpi_device *device, int type)
{
{
	acpi_status status;
	acpi_handle handle;
	struct acpi_pci_root *root = acpi_driver_data(device);
	struct acpi_pci_root *root = acpi_driver_data(device);
	struct acpi_pci_driver *driver;
	struct acpi_pci_driver *driver;


@@ -678,6 +680,10 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type)
	device_set_run_wake(root->bus->bridge, false);
	device_set_run_wake(root->bus->bridge, false);
	pci_acpi_remove_bus_pm_notifier(device);
	pci_acpi_remove_bus_pm_notifier(device);


	status = acpi_get_handle(device->handle, METHOD_NAME__PRT, &handle);
	if (ACPI_SUCCESS(status))
		acpi_pci_irq_del_prt(root->bus);

	pci_remove_root_bus(root->bus);
	pci_remove_root_bus(root->bus);


	mutex_lock(&acpi_pci_root_lock);
	mutex_lock(&acpi_pci_root_lock);