mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
USB: cleanup for previous patches
This patch (as951) cleans up a few loose ends from earlier patches. Redundant checks for non-NULL urb->dev are removed, as are checks of urb->dev->bus (which can never be NULL). Conversely, a check for non-NULL urb->ep is added to the unlink paths. A homegrown round-down-to-power-of-2 loop is simplified by using the ilog2 routine. The comparison in usb_urb_dir_in() is made more transparent. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
18ea5d00d0
commit
d617bc83ff
3 changed files with 8 additions and 12 deletions
|
@ -1395,7 +1395,7 @@ extern int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor,
|
|||
*/
|
||||
static inline int usb_urb_dir_in(struct urb *urb)
|
||||
{
|
||||
return (urb->transfer_flags & URB_DIR_MASK) != URB_DIR_OUT;
|
||||
return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_IN;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue