UPSTREAM: usb: dwc2: host: Reorder things in hcd_queue.c
authorDouglas Anderson <dianders@chromium.org>
Fri, 29 Jan 2016 02:20:05 +0000 (18:20 -0800)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 3 Jan 2017 10:48:18 +0000 (18:48 +0800)
commit76e44a44aa723d0475e25f5d69e0dc51bead9761
tree6131b08f61f090b31adb3f9443543c28db16f982
parentb2653b3a2b390b06713293997e7e195417dd3056
UPSTREAM: usb: dwc2: host: Reorder things in hcd_queue.c

This no-op change just reorders a few functions in hcd_queue.c in order
to prepare for future changes.  Motivations here:

The functions dwc2_hcd_qh_free() and dwc2_hcd_qh_create() are exported
functions.  They are not called within the file.  That means that they
should be near the bottom so that they can easily call static helpers.

The function dwc2_qh_init() is only called by dwc2_hcd_qh_create() and
should move near the bottom with it.

The only reason that the dwc2_unreserve_timer_fn() timer function (and
its subroutine dwc2_do_unreserve()) were so high in the file was that
they needed to be above dwc2_qh_init().  Now that dwc2_qh_init() has
been moved down it can be moved down a bit.  A later patch will split
the reserve code out of dwc2_schedule_periodic() and the reserve
function should be near the unreserve function.  The reserve function
needs to be below dwc2_find_uframe() since it calls that.

Change-Id: Ia9a230c8521ca8e98bff606d1863760a62a448d1
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit b951c6c7f875d2c72c6e16a4d5fa810cbb33ae32)
drivers/usb/dwc2/hcd_queue.c