]> 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)
commit11894b6bfcf7798a646d63347671469d07db32d8
treeaaddbdfa86dfa7890e74c3a9b805dff53b8dc085
parent4cd2222e9f657091f8cc369b5bd9895a3676a9f5
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