• S
    musb_host: simplify check for active URB · 22a0d6f1
    Sergei Shtylyov 提交于
    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: NSergei Shtylyov <sshtylyov@ru.mvista.com>
    Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
    22a0d6f1
musb_host.c 60.9 KB