/* Allocate a request for an endpoint. Reused by ep0 code.  */
struct usb_request* musb_alloc_request(struct usb_ep *ep, gfp_t gfp_flags)
/* Allocate a request for an endpoint. Reused by ep0 code.  */
struct usb_request* musb_alloc_request(struct usb_ep *ep, gfp_t gfp_flags)
{
	struct musb_ep		*musb_ep = to_musb_ep(ep);
	struct musb		*musb = musb_ep->musb;
	struct musb_request	*request = NULL;
	request = kzalloc(sizeof *request, gfp_flags);
	if (!request) {
		dev_dbg(musb->controller, "not enough memory\n");
		return NULL;
	}
	request->request.dma = DMA_ADDR_INVALID;
	request->epnum = musb_ep->current_epnum;
	request->ep = musb_ep;
	return &request->request;
}