---
name: "usb_ep_alloc_request"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/usb_ep_alloc_request"
---

# usb\_ep\_alloc\_request(9)

allocate a request object to use with this endpoint

## NAME

usb\_ep\_alloc\_request - allocate a request object to use with this endpoint

## SYNOPSIS

**struct usb\_request \* usb\_ep\_alloc\_request(struct usb\_ep \*** *ep***, gfp\_t** *gfp\_flags***);**

## ARGUMENTS

*ep*

the endpoint to be used with with the request

*gfp\_flags*

GFP\_\* flags to use

## DESCRIPTION

Request objects must be allocated with this call, since they normally need controller-specific setup and may even need endpoint-specific resources such as allocation of DMA descriptors. Requests may be submitted with **usb\_ep\_queue**, and receive a single completion callback. Free requests with **usb\_ep\_free\_request**, when they are no longer needed.

Returns the request, or null if one could not be allocated.

## AUTHOR

**David Brownell** \<dbrownell@users.sourceforge.net\>

Author.

## COPYRIGHT
