提交 192fef18 编写于 作者: L Lan Tianyu 提交者: Greg Kroah-Hartman

usb: enable usb port device's async suspend.

This patch is to set power.async_suspend for usb port in order
to allow it to be suspended and resumed asynchronously during
system sleep transitions.

The power.async_suspend flag is also set for devices that don't have
suspend or resume callbacks, because otherwise they would make the
main suspend/resume thread wait for their "asynchronous" children
(during suspend) or parents (during resume), effectively negating the
possible gains from executing these devices' suspend and resume
callbacks asynchronously.
Signed-off-by: NLan Tianyu <tianyu.lan@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f6cced1a
......@@ -186,6 +186,7 @@ int usb_hub_create_port_device(struct usb_hub *hub, int port1)
PM_QOS_FLAG_NO_POWER_OFF))
pm_runtime_enable(&port_dev->dev);
device_enable_async_suspend(&port_dev->dev);
retval = usb_acpi_register_power_resources(&port_dev->dev);
if (retval && retval != -ENODEV)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册