aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-09-17 22:16:12 -0700
committerYinghai Lu <yinghai@kernel.org>2012-09-17 22:16:12 -0700
commitcfa155275efe3996c7f743fc401bd5773e85abc7 (patch)
treef1576e11bfb5d46a5a6ff94fdb76f43f8ac9625d
parent893ba79bd66fa7a78811ebd1e1976d6986911a79 (diff)
downloadlinux-yinghai-cfa155275efe3996c7f743fc401bd5773e85abc7.tar.gz
ACPI: acpi_bus_trim to support two steps.
current all acpi_bus_trim callers have rmdevice to 1. that means it will remove all acpi devices. When 0, is passed, it will keep one parent. For root bus hotremove support, we need to have pci device removed before acpi devices. So try to keep all acpi devices, and only stop drivers with them. This change should be safe because all current callers all have 1 passed. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Len Brown <lenb@kernel.org> Cc: linux-acpi@vger.kernel.org
-rw-r--r--drivers/acpi/scan.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index d1ecca2b641a97..d1a1f258a90d95 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1539,10 +1539,7 @@ int acpi_bus_trim(struct acpi_device *start, int rmdevice)
child = parent;
parent = parent->parent;
- if (level == 0)
- err = acpi_bus_remove(child, rmdevice);
- else
- err = acpi_bus_remove(child, 1);
+ err = acpi_bus_remove(child, rmdevice);
continue;
}