carta
usb_altnum_to_altsetting(9)

usb_altnum_to_altsetting9

Get the altsetting structure with a given alternate setting number.

Arguments

intf

the interface containing the altsetting in question

altnum

the desired alternate setting number

Overview

This searches the altsetting array of the specified interface for an entry with the correct bAlternateSetting value.

Note that altsettings need not be stored sequentially by number, so it would be incorrect to assume that the first altsetting entry in the array corresponds to altsetting zero. This routine helps device drivers avoid such mistakes.

Don't call this function unless you are bound to the intf interface or you have locked the device!

Return

A pointer to the entry of the altsetting array of intf that has altnum as the alternate setting number. NULL if not found.

History

  • Debian 9 (Stretch): the text shown here
  • Debian 8 (Jessie)
  • Debian 7 (Wheezy)
  • Debian 6.0 (Squeeze)
  • Debian 5.0 (Lenny)
  • Debian 4.0 (Etch)

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