summaryrefslogtreecommitdiff
path: root/drivers/usb/core/hub.h
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/hub.h
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/hub.h')
-rw-r--r--drivers/usb/core/hub.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h
index 048c797f394c..3ef1c2e435cc 100644
--- a/drivers/usb/core/hub.h
+++ b/drivers/usb/core/hub.h
@@ -51,6 +51,9 @@ struct usb_hub {
device present */
unsigned long wakeup_bits[1]; /* ports that have signaled
remote wakeup */
+ unsigned long power_bits[1]; /* ports that are powered */
+ unsigned long child_usage_bits[1]; /* ports powered on for
+ children */
#if USB_MAXCHILDREN > 31 /* 8*sizeof(unsigned long) - 1 */
#error event_bits[] is too short!
#endif
@@ -86,8 +89,6 @@ struct usb_hub {
* @connect_type: port's connect type
* @location: opaque representation of platform connector location
* @portnum: port index num based one
- * @power_is_on: port's power state
- * @did_runtime_put: port has done pm_runtime_put().
*/
struct usb_port {
struct usb_device *child;
@@ -97,8 +98,6 @@ struct usb_port {
enum usb_port_connect_type connect_type;
usb_port_location_t location;
u8 portnum;
- unsigned power_is_on:1;
- unsigned did_runtime_put:1;
};
#define to_usb_port(_dev) \