summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2012-02-06 13:40:17 +0200
committerFelipe Balbi <balbi@ti.com>2012-02-06 13:40:17 +0200
commitd70d84423cbc5d6d929640189cf204e693024309 (patch)
tree0b237104ae511f4f4650d7d49bd4ca87d3d7ba31 /drivers/usb/dwc3
parent8b5d6b0a4353d0e3517947f894be215750d681bb (diff)
downloadlinux-d70d84423cbc5d6d929640189cf204e693024309.tar.gz
linux-d70d84423cbc5d6d929640189cf204e693024309.tar.bz2
linux-d70d84423cbc5d6d929640189cf204e693024309.zip
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: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/gadget.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 2c4482f13a12..1f64e7c1c34f 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