dect
/
linux-2.6
Archived
13
0
Fork 0

EHCI: replace mult/div with bit-mask operation

This patch (as1610) replaces multiplication and divison operations in
ehci-hcd's isochronous scheduling code with a bit-mask operation,
taking advantage of the fact that isochronous periods are always
powers of 2.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Alan Stern 2012-09-28 16:01:40 -04:00 committed by Greg Kroah-Hartman
parent 98cae42d82
commit 7267547992
1 changed files with 1 additions and 1 deletions

View File

@ -1416,7 +1416,7 @@ iso_stream_schedule (
/* Behind the scheduling threshold? Assume URB_ISO_ASAP. */
if (unlikely(start < next))
start += period * DIV_ROUND_UP(next - start, period);
start += (next - start + period - 1) & (- period);
start += base;
}