diff options
author | Dan Williams <dan.j.williams@intel.com> | 2013-10-07 14:58:20 -0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2013-10-16 18:48:30 -0400 |
commit | fd1ac4cf524018198373c5eb90ca0e7968c5bbb8 (patch) | |
tree | 6e5f2d4fd38ab4e3e7a2427200c1fe36c0cc8d89 /drivers/usb/core | |
parent | c69a059783b241c42188d472e2e9460d3cd4a4cc (diff) |
usb: hub_activate kill an 'else'
Remove a few extra lines and make it clear that all implementations
disable the port by sharing the same line of code.
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/hub.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 566ac5531407..3da607490d18 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -1112,16 +1112,13 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) | |||
1112 | /* | 1112 | /* |
1113 | * USB3 protocol ports will automatically transition | 1113 | * USB3 protocol ports will automatically transition |
1114 | * to Enabled state when detect an USB3.0 device attach. | 1114 | * to Enabled state when detect an USB3.0 device attach. |
1115 | * Do not disable USB3 protocol ports. | 1115 | * Do not disable USB3 protocol ports, just pretend |
1116 | * power was lost | ||
1116 | */ | 1117 | */ |
1117 | if (!hub_is_superspeed(hdev)) { | 1118 | portstatus &= ~USB_PORT_STAT_ENABLE; |
1119 | if (!hub_is_superspeed(hdev)) | ||
1118 | usb_clear_port_feature(hdev, port1, | 1120 | usb_clear_port_feature(hdev, port1, |
1119 | USB_PORT_FEAT_ENABLE); | 1121 | USB_PORT_FEAT_ENABLE); |
1120 | portstatus &= ~USB_PORT_STAT_ENABLE; | ||
1121 | } else { | ||
1122 | /* Pretend that power was lost for USB3 devs */ | ||
1123 | portstatus &= ~USB_PORT_STAT_ENABLE; | ||
1124 | } | ||
1125 | } | 1122 | } |
1126 | 1123 | ||
1127 | /* Clear status-change flags; we'll debounce later */ | 1124 | /* Clear status-change flags; we'll debounce later */ |