提交 9a4d8d60 编写于 作者: L Lee, Chun-Yi 提交者: Rafael J. Wysocki

ACPI / bus: handle ACPI hotplug schedule errors completely

Kernel should decrements the reference count of ACPI device
when the scheduling of ACPI hotplug work failed, and evaluates
_OST to notify BIOS the failure.
Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: N"Lee, Chun-Yi" <jlee@suse.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 6f7da290
...@@ -432,11 +432,15 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data) ...@@ -432,11 +432,15 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
(driver->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS)) (driver->flags & ACPI_DRIVER_ALL_NOTIFY_EVENTS))
driver->ops.notify(adev, type); driver->ops.notify(adev, type);
if (hotplug_event && ACPI_SUCCESS(acpi_hotplug_schedule(adev, type))) if (!hotplug_event) {
acpi_bus_put_acpi_device(adev);
return;
}
if (ACPI_SUCCESS(acpi_hotplug_schedule(adev, type)))
return; return;
acpi_bus_put_acpi_device(adev); acpi_bus_put_acpi_device(adev);
return;
err: err:
acpi_evaluate_ost(handle, type, ost_code, NULL); acpi_evaluate_ost(handle, type, ost_code, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册