USB: cleanup for previous patches
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 2 Aug 2007 19:04:52 +0000 (15:04 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Oct 2007 21:55:01 +0000 (14:55 -0700)
commitd617bc83ff48ebf0df253605529d8b3bef15773a
tree15bc0597e795a5dd1cd5c683a052f5a116442ba8
parent18ea5d00d05fa6300606f0711748016c95fb26dc
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>
drivers/usb/core/hcd.c
drivers/usb/core/urb.c
include/linux/usb.h