summaryrefslogtreecommitdiff
path: root/drivers/usb/core/port.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2014-05-20 18:08:52 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-27 16:38:53 -0700
commitd5c3834e4af3acc4d7fc52faba2711c666655632 (patch)
tree78f1249a5347f81e8250fd8f26261f98fd024ccc /drivers/usb/core/port.c
parentb7e38eac88265c4cb779edc72a5906116fc6c000 (diff)
usb: make usb_port flags atomic, rename did_runtime_put to child_usage
We want to manipulate ->did_runtime_put in usb_port_runtime_resume(), but we don't want that to collide with other updates. Move usb_port flags to new port-bitmap fields in usb_hub. "did_runtime_put" is renamed "child_usage_bits" to reflect that it is strictly standing in for the fact that usb_devices are not the device_model children of their parent port. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/port.c')
-rw-r--r--drivers/usb/core/port.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c
index 40c3ac173e9e..795778c71e31 100644
--- a/drivers/usb/core/port.c
+++ b/drivers/usb/core/port.c
@@ -82,7 +82,7 @@ static int usb_port_runtime_resume(struct device *dev)
if (!hub)
return -EINVAL;
if (hub->in_reset) {
- port_dev->power_is_on = 1;
+ set_bit(port1, hub->power_bits);
return 0;
}
@@ -320,7 +320,7 @@ int usb_hub_create_port_device(struct usb_hub *hub, int port1)
hub->ports[port1 - 1] = port_dev;
port_dev->portnum = port1;
- port_dev->power_is_on = true;
+ set_bit(port1, hub->power_bits);
port_dev->dev.parent = hub->intfdev;
port_dev->dev.groups = port_dev_group;
port_dev->dev.type = &usb_port_device_type;