usb_alloc_urb(9)

usb_alloc_urb9

Creates a new urb for a usb driver to use

Usage

struct urb * usb_alloc_urb(int iso_packets, gfp_t mem_flags);

Arguments

iso_packets

number of iso packets for this urb

mem_flags

the type of memory to allocate, see kmalloc for a list of valid options for this.

Overview

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.

The driver must call usb_free_urb when it is finished with the urb.

Return

A pointer to the new urb, or NULL if no memory is available.

Releases

6 releases since Debian 4.0 (Etch); the text changed 5 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.