Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226971
b: refs/heads/master
c: 0a91efa
h: refs/heads/master
i:
  226969: c84cda7
  226967: d09fdac
v: v3
  • Loading branch information
Pavankumar Kondeti authored and Greg Kroah-Hartman committed Dec 10, 2010
1 parent cb75a1d commit cb47124
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 409a15da9851b6e6a5e1c5787be31a987184b7cf
refs/heads/master: 0a91efa2f951d790969dec96fb675ca7869eca83
9 changes: 3 additions & 6 deletions trunk/drivers/usb/gadget/ci13xxx_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,7 @@ __acquires(udc->lock)
spin_unlock(udc->lock);
retval = usb_ep_enable(&mEp->ep, &ctrl_endpt_desc);
if (!retval) {
mEp->status = usb_ep_alloc_request(&mEp->ep, GFP_KERNEL);
mEp->status = usb_ep_alloc_request(&mEp->ep, GFP_ATOMIC);
if (mEp->status == NULL) {
usb_ep_disable(&mEp->ep);
retval = -ENOMEM;
Expand Down Expand Up @@ -2055,7 +2055,6 @@ static struct usb_request *ep_alloc_request(struct usb_ep *ep, gfp_t gfp_flags)
{
struct ci13xxx_ep *mEp = container_of(ep, struct ci13xxx_ep, ep);
struct ci13xxx_req *mReq = NULL;
unsigned long flags;

trace("%p, %i", ep, gfp_flags);

Expand All @@ -2064,8 +2063,6 @@ static struct usb_request *ep_alloc_request(struct usb_ep *ep, gfp_t gfp_flags)
return NULL;
}

spin_lock_irqsave(mEp->lock, flags);

mReq = kzalloc(sizeof(struct ci13xxx_req), gfp_flags);
if (mReq != NULL) {
INIT_LIST_HEAD(&mReq->queue);
Expand All @@ -2080,8 +2077,6 @@ static struct usb_request *ep_alloc_request(struct usb_ep *ep, gfp_t gfp_flags)

dbg_event(_usb_addr(mEp), "ALLOC", mReq == NULL);

spin_unlock_irqrestore(mEp->lock, flags);

return (mReq == NULL) ? NULL : &mReq->req;
}

Expand Down Expand Up @@ -2404,9 +2399,11 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
/* this allocation cannot be random */
for (k = RX; k <= TX; k++) {
INIT_LIST_HEAD(&mEp->qh[k].queue);
spin_unlock_irqrestore(udc->lock, flags);
mEp->qh[k].ptr = dma_pool_alloc(udc->qh_pool,
GFP_KERNEL,
&mEp->qh[k].dma);
spin_lock_irqsave(udc->lock, flags);
if (mEp->qh[k].ptr == NULL)
retval = -ENOMEM;
else
Expand Down

0 comments on commit cb47124

Please sign in to comment.