]> asedeno.scripts.mit.edu Git - linux.git/commit
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)
committerFelipe Balbi <balbi@kernel.org>
Fri, 4 Mar 2016 13:14:43 +0000 (15:14 +0200)
commitb951c6c7f875d2c72c6e16a4d5fa810cbb33ae32
treedec3c2260fb804209b0b57fef87361c8f1427e33
parentced9eee1229db3bbe683ae17e0a91a8642382a39
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.

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>
drivers/usb/dwc2/hcd_queue.c