USB: EHCI: simplify remainder computations
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 14 Jul 2010 15:03:36 +0000 (11:03 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 21:35:40 +0000 (14:35 -0700)
commitbccbefaae050186bed3bcc74b1fd1a9b8c6710b2
tree26f1da2850c372bd78e733d7b14006d86abb5b0d
parentae68a83bdc1971cb02fefc7a686ba6d077065e71
USB: EHCI: simplify remainder computations

This patch (as1406) adds a micro-optimization to ehci-hcd's scheduling
code.  Instead of computing remainders with respect to the schedule
length, use bitwise-and (which is quicker).  We know that the schedule
length will always be a power of two, but the compiler doesn't have
this information.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-sched.c