summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2013-10-07 11:58:20 -0700
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2013-10-16 15:48:30 -0700
commitfd1ac4cf524018198373c5eb90ca0e7968c5bbb8 (patch)
tree6e5f2d4fd38ab4e3e7a2427200c1fe36c0cc8d89 /drivers/usb/core/hub.c
parentc69a059783b241c42188d472e2e9460d3cd4a4cc (diff)
downloadlinux-fd1ac4cf524018198373c5eb90ca0e7968c5bbb8.tar.gz
linux-fd1ac4cf524018198373c5eb90ca0e7968c5bbb8.tar.bz2
linux-fd1ac4cf524018198373c5eb90ca0e7968c5bbb8.zip
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/hub.c')
-rw-r--r--drivers/usb/core/hub.c11
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)
/*
* USB3 protocol ports will automatically transition
* to Enabled state when detect an USB3.0 device attach.
- * Do not disable USB3 protocol ports.
+ * Do not disable USB3 protocol ports, just pretend
+ * power was lost
*/
- if (!hub_is_superspeed(hdev)) {
+ portstatus &= ~USB_PORT_STAT_ENABLE;
+ if (!hub_is_superspeed(hdev))
usb_clear_port_feature(hdev, port1,
USB_PORT_FEAT_ENABLE);
- portstatus &= ~USB_PORT_STAT_ENABLE;
- } else {
- /* Pretend that power was lost for USB3 devs */
- portstatus &= ~USB_PORT_STAT_ENABLE;
- }
}
/* Clear status-change flags; we'll debounce later */