usb: gadget: Refactor request completion
Use the recently introduced usb_gadget_giveback_request() in favor of direct invocation of the completion routine. All places in drivers/usb/ matching "[-.]complete(" were replaced with a call to usb_gadget_giveback_request(). This was compile-tested with all ARM drivers enabled and runtime-tested for musb. Signed-off-by: Michal Sojka <sojka@merica.cz> Acked-by: Felipe Balbi <balbi@ti.com> Tested-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
3fc2aa5522
commit
304f7e5e1d
@@ -627,7 +627,7 @@ __acquires(hwep->lock)
|
||||
|
||||
if (hwreq->req.complete != NULL) {
|
||||
spin_unlock(hwep->lock);
|
||||
hwreq->req.complete(&hwep->ep, &hwreq->req);
|
||||
usb_gadget_giveback_request(&hwep->ep, &hwreq->req);
|
||||
spin_lock(hwep->lock);
|
||||
}
|
||||
}
|
||||
@@ -922,7 +922,7 @@ __acquires(hwep->lock)
|
||||
if ((hwep->type == USB_ENDPOINT_XFER_CONTROL) &&
|
||||
hwreq->req.length)
|
||||
hweptemp = hwep->ci->ep0in;
|
||||
hwreq->req.complete(&hweptemp->ep, &hwreq->req);
|
||||
usb_gadget_giveback_request(&hweptemp->ep, &hwreq->req);
|
||||
spin_lock(hwep->lock);
|
||||
}
|
||||
}
|
||||
@@ -1347,7 +1347,7 @@ static int ep_dequeue(struct usb_ep *ep, struct usb_request *req)
|
||||
|
||||
if (hwreq->req.complete != NULL) {
|
||||
spin_unlock(hwep->lock);
|
||||
hwreq->req.complete(&hwep->ep, &hwreq->req);
|
||||
usb_gadget_giveback_request(&hwep->ep, &hwreq->req);
|
||||
spin_lock(hwep->lock);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user