1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct usb_interface_cache</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The Linux-USB Host Side API"><link rel="up" href="hostside.html" title="Chapter&#160;4.&#160;Host-Side Data Types and Macros"><link rel="prev" href="API-struct-usb-interface.html" title="struct usb_interface"><link rel="next" href="API-struct-usb-host-config.html" title="struct usb_host_config"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct usb_interface_cache</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-usb-interface.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;4.&#160;Host-Side Data Types and Macros</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-struct-usb-host-config.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-usb-interface-cache"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct usb_interface_cache &#8212; 
2     long-term representation of a device interface
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct usb_interface_cache {
5  unsigned num_altsetting;
6  struct kref ref;
7  struct usb_host_interface altsetting[0];
8};  </pre></div><div class="refsect1"><a name="idp1115574116"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">num_altsetting</span></dt><dd><p>
9   number of altsettings defined.
10      </p></dd><dt><span class="term">ref</span></dt><dd><p>
11   reference counter.
12      </p></dd><dt><span class="term">altsetting[0]</span></dt><dd><p>
13   variable-length array of interface structures, one for
14   each alternate setting that may be selected.  Each one includes a
15   set of endpoint configurations.  They will be in no particular order.
16      </p></dd></dl></div></div><div class="refsect1"><a name="idp1115576876"></a><h2>Description</h2><p>
17   These structures persist for the lifetime of a usb_device, unlike
18   struct usb_interface (which persists only as long as its configuration
19   is installed).  The altsetting arrays can be accessed through these
20   structures at any time, permitting comparison of configurations and
21   providing support for the /proc/bus/usb/devices pseudo-file.
22</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-usb-interface.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="hostside.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-struct-usb-host-config.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct usb_interface</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">struct usb_host_config</span></td></tr></table></div></body></html>
23