musb_host: factor out musb_ep_{get|set}_qh()
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Fri, 27 Mar 2009 19:55:16 +0000 (12:55 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Jun 2009 04:44:40 +0000 (21:44 -0700)
commit3e5c6dc71146c2c3f21d60d3b4b25dc7755d5339
tree6d143a910ce47f6a8cd4da9c76493114005e4ecb
parent846099a61cf549f450178f1fb3e27adcbd9dcfc2
musb_host: factor out musb_ep_{get|set}_qh()

Factor out the often used code to get/set the active 'qh'
pointer for the hardware endpoint.  Change the way the case
of a shared FIFO is handled by setting *both* 'in_qh' and
'out_qh' fields of 'struct musb_hw_ep'.  That seems more
consistent and makes getting to the current 'qh' easy when
the code knows the direction beforehand.

While at it, turn some assignments into intializers and
fix declaration style in the vicinity.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/musb/musb_host.c