1USB_ALLOC_URB(9) USB Core APIs USB_ALLOC_URB(9)
2
3
4
6 usb_alloc_urb - creates a new urb for a USB driver to use
7
9 struct urb * usb_alloc_urb(int iso_packets, gfp_t mem_flags);
10
12 iso_packets
13 number of iso packets for this urb
14
15 mem_flags
16 the type of memory to allocate, see kmalloc for a list of valid
17 options for this.
18
20 Creates an urb for the USB driver to use, initializes a few internal
21 structures, increments the usage counter, and returns a pointer to it.
22
23 If the driver want to use this urb for interrupt, control, or bulk
24 endpoints, pass '0' as the number of iso packets.
25
26 The driver must call usb_free_urb when it is finished with the urb.
27
29 A pointer to the new urb, or NULL if no memory is available.
30
32Kernel Hackers Manual 3.10 June 2019 USB_ALLOC_URB(9)