From d5c3834e4af3acc4d7fc52faba2711c666655632 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 20 May 2014 18:08:52 -0700 Subject: 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 Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb/core/port.c') 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; -- cgit v1.2.3