diff options
author | Felipe Balbi <balbi@ti.com> | 2012-02-06 13:40:17 +0200 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2012-03-19 09:31:58 +0800 |
commit | 98431fd26f86f60de51cc82fcd726469b75f75dd (patch) | |
tree | 8449b0b794a4f7e44f794d7bc9022f00d0b5df7a | |
parent | 8c197c0d4878ed87128e1f2fa6d3da8662e52cea (diff) |
usb: dwc3: gadget: avoid memcpy()ing event buffertracking-topic-usb-dwc3
We're only using the 4 byte events and memcpy()
will make us slower. We can easily avoid that.
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 2c4482f13a1..1f64e7c1c34 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -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 |