提交 511d5c42 编写于 作者: R Rafael J. Wysocki

ACPI / PM: Handle missing _PSC in acpi_bus_update_power()

If _PS0 is defined for an ACPI device node, but _PSC isn't and
the device node doesn't use power resources for power management,
acpi_bus_update_power() will fail to update the power state of it,
because acpi_device_get_power() returns ACPI_STATE_UNKNOWN in that
case.

To handle that situation make acpi_bus_update_power() follow
acpi_bus_init_power() and try to force the given device node into
power state D0.
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 b3785492
......@@ -355,6 +355,9 @@ int acpi_bus_update_power(acpi_handle handle, int *state_p)
if (result)
return result;
if (state == ACPI_STATE_UNKNOWN)
state = ACPI_STATE_D0;
result = acpi_device_set_power(device, state);
if (!result && state_p)
*state_p = state;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册