ACPI / hotplug: Carry out PCI root eject directly
Since _handle_hotplug_event_root() is run from the ACPI hotplug
workqueue, it doesn't need to queue up a work item to eject a PCI
host bridge on the same workqueue. Instead, it can just carry out
the eject by calling acpi_bus_device_eject() directly, so make that
happen.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 4a0a591..c7317fe 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -285,7 +285,7 @@
return 0;
}
-static void acpi_bus_device_eject(struct acpi_device *device, u32 ost_src)
+void acpi_bus_device_eject(struct acpi_device *device, u32 ost_src)
{
acpi_handle handle = device->handle;
struct acpi_scan_handler *handler;
@@ -409,7 +409,7 @@
* acpi_bus_hot_remove_device: Hot-remove a device and its children.
* @context: Address of the ACPI device object to hot-remove.
*/
-void acpi_bus_hot_remove_device(void *context)
+static void acpi_bus_hot_remove_device(void *context)
{
acpi_bus_device_eject(context, ACPI_NOTIFY_EJECT_REQUEST);
}