]> git.baikalelectronics.ru Git - kernel.git/commit
USB: refactor code for enabling/disabling remote wakeup
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 30 Jul 2013 19:37:33 +0000 (15:37 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Aug 2013 00:29:03 +0000 (17:29 -0700)
commit182fe0756db96bb638536c6970d10b969dcd0fe7
treeaaddbdfa86dfa7890e74c3a9b805dff53b8dc085
parentad36b0545e620d582dd8b336a252362c83526cba
USB: refactor code for enabling/disabling remote wakeup

The hub driver is inconsistent in its organization of code for
enabling and disabling remote wakeup.  There is a special routine to
disable wakeup for SuperSpeed devices but not for slower devices, and
there is no special routine to enable wakeup.

This patch refactors the code.  It renames and changes the existing
function to make it handle both SuperSpeed and non-SuperSpeed devices,
and it adds a corresponding routine to enable remote wakeup.  It also
changes the speed determination to look at the device's speed rather
than the speed of the parent hub -- this shouldn't make any difference
because a SuperSpeed device always has to be attached to a SuperSpeed
hub and conversely.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c