'\" t .\" Title: usb_alloc_urb .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: April 2019 .\" Manual: USB Core APIs .\" Source: Kernel Hackers Manual 4.9.168 .\" Language: English .\" .TH "USB_ALLOC_URB" "9" "April 2019" "Kernel Hackers Manual 4\&.9\&." "USB Core APIs" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" usb_alloc_urb \- creates a new urb for a USB driver to use .SH "SYNOPSIS" .HP \w'struct\ urb\ *\ usb_alloc_urb('u .BI "struct urb * usb_alloc_urb(int\ " "iso_packets" ", gfp_t\ " "mem_flags" ");" .SH "ARGUMENTS" .PP \fIiso_packets\fR .RS 4 number of iso packets for this urb .RE .PP \fImem_flags\fR .RS 4 the type of memory to allocate, see \fBkmalloc\fR for a list of valid options for this\&. .RE .SH "DESCRIPTION" .PP Creates an urb for the USB driver to use, initializes a few internal structures, increments the usage counter, and returns a pointer to it\&. .PP If the driver want to use this urb for interrupt, control, or bulk endpoints, pass \*(Aq0\*(Aq as the number of iso packets\&. .PP The driver must call \fBusb_free_urb\fR when it is finished with the urb\&. .SH "RETURN" .PP A pointer to the new urb, or \fBNULL\fR if no memory is available\&. .SH "COPYRIGHT" .br