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>
/* 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;
}