aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorLan Tianyu <tianyu.lan@intel.com>2013-01-22 15:26:32 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 13:14:20 -0500
commit192fef18d0f5ac9a05a93ff6314fc9865c10fbf9 (patch)
tree200d5fb4bf44c30f3fd12d427e34d796ee9cc0d1 /drivers/usb
parentf6cced1a08b475c5ac946823bb057714be7af4f6 (diff)
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: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/port.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c
index 9a15b26944ec..5df143dbd759 100644
--- a/drivers/usb/core/port.c
+++ b/drivers/usb/core/port.c
@@ -186,6 +186,7 @@ int usb_hub_create_port_device(struct usb_hub *hub, int port1)
186 PM_QOS_FLAG_NO_POWER_OFF)) 186 PM_QOS_FLAG_NO_POWER_OFF))
187 pm_runtime_enable(&port_dev->dev); 187 pm_runtime_enable(&port_dev->dev);
188 188
189 device_enable_async_suspend(&port_dev->dev);
189 190
190 retval = usb_acpi_register_power_resources(&port_dev->dev); 191 retval = usb_acpi_register_power_resources(&port_dev->dev);
191 if (retval && retval != -ENODEV) 192 if (retval && retval != -ENODEV)