Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354707
b: refs/heads/master
c: f6cced1
h: refs/heads/master
i:
  354705: 9f29f45
  354703: 604d891
v: v3
  • Loading branch information
Lan Tianyu authored and Greg Kroah-Hartman committed Jan 25, 2013
1 parent 0f92a6c commit 9326b70
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad493e5e580546e6c3024b76a41535476da1546a
refs/heads/master: f6cced1a08b475c5ac946823bb057714be7af4f6
11 changes: 10 additions & 1 deletion trunk/drivers/usb/core/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ static void usb_port_device_release(struct device *dev)
{
struct usb_port *port_dev = to_usb_port(dev);

dev_pm_qos_hide_flags(dev);
usb_acpi_unregister_power_resources(dev);
kfree(port_dev);
}
Expand Down Expand Up @@ -176,7 +177,15 @@ int usb_hub_create_port_device(struct usb_hub *hub, int port1)
goto error_register;

pm_runtime_set_active(&port_dev->dev);
pm_runtime_enable(&port_dev->dev);

/* It would be dangerous if user space couldn't
* prevent usb device from being powered off. So don't
* enable port runtime pm if failed to expose port's pm qos.
*/
if (!dev_pm_qos_expose_flags(&port_dev->dev,
PM_QOS_FLAG_NO_POWER_OFF))
pm_runtime_enable(&port_dev->dev);


retval = usb_acpi_register_power_resources(&port_dev->dev);
if (retval && retval != -ENODEV)
Expand Down

0 comments on commit 9326b70

Please sign in to comment.