git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
drivers
/
usb
/
gadget
/
omap_udc.c
diff --git
a/drivers/usb/gadget/omap_udc.c
b/drivers/usb/gadget/omap_udc.c
index
fbea514
..
a8972d7
100644
(file)
--- a/
drivers/usb/gadget/omap_udc.c
+++ b/
drivers/usb/gadget/omap_udc.c
@@
-273,8
+273,9
@@
omap_alloc_request(struct usb_ep *ep, gfp_t gfp_flags)
{
struct omap_req *req;
{
struct omap_req *req;
- req = k
zalloc(sizeof(*req)
, gfp_flags);
+ req = k
malloc(sizeof *req
, gfp_flags);
if (req) {
if (req) {
+ memset (req, 0, sizeof *req);
req->req.dma = DMA_ADDR_INVALID;
INIT_LIST_HEAD (&req->queue);
}
req->req.dma = DMA_ADDR_INVALID;
INIT_LIST_HEAD (&req->queue);
}
@@
-2585,10
+2586,11
@@
omap_udc_setup(struct platform_device *odev, struct otg_transceiver *xceiv)
/* UDC_PULLUP_EN gates the chip clock */
// OTG_SYSCON_1_REG |= DEV_IDLE_EN;
/* UDC_PULLUP_EN gates the chip clock */
// OTG_SYSCON_1_REG |= DEV_IDLE_EN;
- udc = k
zalloc(sizeof(*udc)
, SLAB_KERNEL);
+ udc = k
malloc (sizeof *udc
, SLAB_KERNEL);
if (!udc)
return -ENOMEM;
if (!udc)
return -ENOMEM;
+ memset(udc, 0, sizeof *udc);
spin_lock_init (&udc->lock);
udc->gadget.ops = &omap_gadget_ops;
spin_lock_init (&udc->lock);
udc->gadget.ops = &omap_gadget_ops;