提交 d70d8442 编写于 作者: F Felipe Balbi

usb: dwc3: gadget: avoid memcpy()ing event buffer

We're only using the 4 byte events and memcpy()
will make us slower. We can easily avoid that.
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 8b5d6b0a
......@@ -2223,7 +2223,8 @@ static irqreturn_t dwc3_process_event_buf(struct dwc3 *dwc, u32 buf)
while (left > 0) {
union dwc3_event event;
memcpy(&event.raw, (evt->buf + evt->lpos), sizeof(event.raw));
event.raw = *(u32 *) (evt->buf + evt->lpos);
dwc3_process_event_entry(dwc, &event);
/*
* XXX we wrap around correctly to the next entry as almost all
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册