projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b5d6b0
)
usb: dwc3: gadget: avoid memcpy()ing event buffer
author
Felipe Balbi
<balbi@ti.com>
Mon, 6 Feb 2012 11:40:17 +0000
(13:40 +0200)
committer
Felipe Balbi
<balbi@ti.com>
Mon, 6 Feb 2012 11:40:17 +0000
(13:40 +0200)
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>
drivers/usb/dwc3/gadget.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/dwc3/gadget.c
b/drivers/usb/dwc3/gadget.c
index 2c4482f13a12725c9562783d65bd0e2afe5b780b..1f64e7c1c34fb4549c3b5c26291e8663d9bfa09c 100644
(file)
--- 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