]> git.karo-electronics.de Git - karo-tx-linux.git/commit
musb_host: simplify check for active URB
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Fri, 27 Mar 2009 19:56:26 +0000 (12:56 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Jun 2009 04:44:40 +0000 (21:44 -0700)
commit22a0d6f1383c85a7a9759cb805fd06c848c9c4d3
treeafb1ea26aeb23ed0cc570325f4db2aaf2441c2bb
parent3e5c6dc71146c2c3f21d60d3b4b25dc7755d5339
musb_host: simplify check for active URB

The existance of the scheduling list shouldn't matter in
determining whether there's currectly an URB executing on a
hardware endpoint. What should actually matter is the 'in_qh'
or 'out_qh' fields of the 'struct musb_hw_ep' -- those are
set in musb_start_urb() and cleared in musb_giveback() when
the endpoint's URB list drains. Hence we should be able to
replace the big *switch* statements in musb_urb_dequeue()
and musb_h_disable() with mere musb_ep_get_qh() calls...

While at it, do some more changes:

 - add 'is_in' variable to musb_urb_dequeue();

 - remove the unnecessary 'epnum' variable from musb_h_disable();

 - fix the comment style in the vicinity.

This is a minor shrink of source and object code.

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