From: Sergei Shtylyov Date: Fri, 27 Mar 2009 19:56:26 +0000 (-0700) Subject: musb_host: simplify check for active URB X-Git-Tag: v2.6.31-rc1~304^2~135 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22a0d6f1383c85a7a9759cb805fd06c848c9c4d3;p=pandora-kernel.git 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 Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed