summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hub.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2014-05-20 18:09:15 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-27 16:51:50 -0700
commitaf376a461cf075de6358255579c8d42bb1246e18 (patch)
treeb1f6e07252726796e18689c44ac11cd6096fc4c0 /drivers/usb/core/hub.h
parent6908058469e3253637894d1cb3e2581870c77e1d (diff)
downloadop-kernel-dev-af376a461cf075de6358255579c8d42bb1246e18.zip
op-kernel-dev-af376a461cf075de6358255579c8d42bb1246e18.tar.gz
usb: refactor port handling in hub_events()
In preparation for synchronizing port handling with pm_runtime transitions refactor port handling into its own subroutine. We expect that clearing some status flags will be required regardless of the port state, so handle those first and group all non-trivial actions at the bottom of the routine. This also splits off the bottom half of hub_port_connect_change() into hub_port_reconnect() in prepartion for introducing a port->status_lock. hub_port_reconnect() will expect the port lock to not be held while hub_port_connect_change() expects to enter with it held. Other cleanups include: 1/ reflowing to 80 columns 2/ replacing redundant usages of 'hub->hdev' with 'hdev' 3/ consolidate clearing of ->change_bits() in hub_port_connect_change 4/ consolidate calls to usb_reset_device Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/hub.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud