1USB_ALTNUM_TO_ALTSET(9)          USB Core APIs         USB_ALTNUM_TO_ALTSET(9)
2
3
4

NAME

6       usb_altnum_to_altsetting - get the altsetting structure with a given
7       alternate setting number.
8

SYNOPSIS

10       struct usb_host_interface *
11                                                            usb_altnum_to_altsetting(const struct usb_interface * intf,
12                                                            unsigned int altnum);
13

ARGUMENTS

15       intf
16           the interface containing the altsetting in question
17
18       altnum
19           the desired alternate setting number
20

DESCRIPTION

22       This searches the altsetting array of the specified interface for an
23       entry with the correct bAlternateSetting value.
24
25       Note that altsettings need not be stored sequentially by number, so it
26       would be incorrect to assume that the first altsetting entry in the
27       array corresponds to altsetting zero. This routine helps device drivers
28       avoid such mistakes.
29
30       Don't call this function unless you are bound to the intf interface or
31       you have locked the device!
32

RETURN

34       A pointer to the entry of the altsetting array of intf that has altnum
35       as the alternate setting number.  NULL if not found.
36
38Kernel Hackers Manual 3.10         June 2019           USB_ALTNUM_TO_ALTSET(9)
Impressum