aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-08-02 15:04:52 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 17:55:01 -0400
commitd617bc83ff48ebf0df253605529d8b3bef15773a (patch)
tree15bc0597e795a5dd1cd5c683a052f5a116442ba8 /include/linux/usb.h
parent18ea5d00d05fa6300606f0711748016c95fb26dc (diff)
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>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 019ae963a9fe..a51f34e80572 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -1395,7 +1395,7 @@ extern int usb_wait_anchor_empty_timeout(struct usb_anchor *anchor,
1395 */ 1395 */
1396static inline int usb_urb_dir_in(struct urb *urb) 1396static inline int usb_urb_dir_in(struct urb *urb)
1397{ 1397{
1398 return (urb->transfer_flags & URB_DIR_MASK) != URB_DIR_OUT; 1398 return (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_IN;
1399} 1399}
1400 1400
1401/** 1401/**