Commit 639e9903c20611772cb38433add6fe2383b9fabf
Committed by
Marek Vasut
1 parent
6ac15fda4e
Exists in
v2017.01-smarct4x
and in
40 other branches
usb: ci_udc: don't memalign() struct ci_req allocations
struct ci_req is a purely software structure, and needs no specific memory alignment. Hence, allocate it with calloc() rather than memalign(). The use of memalign() was left-over from when struct ci_req was going to hold the aligned bounce buffer, but this is now dynamically allocated. Signed-off-by: Stephen Warren <swarren@nvidia.com>
Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff
drivers/usb/gadget/ci_udc.c
... | ... | @@ -222,12 +222,11 @@ |
222 | 222 | if (num == 0 && controller.ep0_req) |
223 | 223 | return &controller.ep0_req->req; |
224 | 224 | |
225 | - ci_req = memalign(ARCH_DMA_MINALIGN, sizeof(*ci_req)); | |
225 | + ci_req = calloc(1, sizeof(*ci_req)); | |
226 | 226 | if (!ci_req) |
227 | 227 | return NULL; |
228 | 228 | |
229 | 229 | INIT_LIST_HEAD(&ci_req->queue); |
230 | - ci_req->b_buf = 0; | |
231 | 230 | |
232 | 231 | if (num == 0) |
233 | 232 | controller.ep0_req = ci_req; |