summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2014-07-01 11:41:18 -0600
committerMarek Vasut <marex@denx.de>2014-07-02 15:45:38 +0200
commit639e9903c20611772cb38433add6fe2383b9fabf (patch)
tree673744ff469e28814cec6bb3fe7d5619ff795b48 /drivers
parent6ac15fda4e2b9ad45b7769037964110f7f597b5c (diff)
downloadtalos-obmc-uboot-639e9903c20611772cb38433add6fe2383b9fabf.tar.gz
talos-obmc-uboot-639e9903c20611772cb38433add6fe2383b9fabf.zip
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/ci_udc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
index 89138675c3..b8c36523eb 100644
--- a/drivers/usb/gadget/ci_udc.c
+++ b/drivers/usb/gadget/ci_udc.c
@@ -222,12 +222,11 @@ ci_ep_alloc_request(struct usb_ep *ep, unsigned int gfp_flags)
if (num == 0 && controller.ep0_req)
return &controller.ep0_req->req;
- ci_req = memalign(ARCH_DMA_MINALIGN, sizeof(*ci_req));
+ ci_req = calloc(1, sizeof(*ci_req));
if (!ci_req)
return NULL;
INIT_LIST_HEAD(&ci_req->queue);
- ci_req->b_buf = 0;
if (num == 0)
controller.ep0_req = ci_req;
OpenPOWER on IntegriCloud