usb_alloc_urb (9) - Linux Man Pages
usb_alloc_urb: creates a new urb for a USB driver to use
usb_alloc_urb - creates a new urb for a USB driver to use
struct urb * usb_alloc_urb(int
iso_packets, gfp_t mem_flags);
- number of iso packets for this urb
- the type of memory to allocate, see kmalloc for a list of valid options for this.
Creates an urb for the USB driver to use, initializes a few internal structures, increments the usage counter, and returns a pointer to it.
If the driver want to use this urb for interrupt, control, or bulk endpoints, pass '0' as the number of iso packets.