提交 72675479 编写于 作者: A Alan Stern 提交者: Greg Kroah-Hartman

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: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 98cae42d
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册