1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct usb_class_driver</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 4. Host-Side Data Types and Macros"><link rel="prev" href="API-struct-usb-device-driver.html" title="struct usb_device_driver"><link rel="next" href="API-module-usb-driver.html" title="module_usb_driver"></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_class_driver</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-usb-device-driver.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Host-Side Data Types and Macros</th><td width="20%" align="right"> <a accesskey="n" href="API-module-usb-driver.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-usb-class-driver"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct usb_class_driver — 2 identifies a USB driver that wants to use the USB major number 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct usb_class_driver { 5 char * name; 6 char *(* devnode) (struct device *dev, umode_t *mode); 7 const struct file_operations * fops; 8 int minor_base; 9}; </pre></div><div class="refsect1"><a name="idp1115799956"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">name</span></dt><dd><p> 10 the usb class device name for this driver. Will show up in sysfs. 11 </p></dd><dt><span class="term">devnode</span></dt><dd><p> 12 Callback to provide a naming hint for a possible 13 device node to create. 14 </p></dd><dt><span class="term">fops</span></dt><dd><p> 15 pointer to the struct file_operations of this driver. 16 </p></dd><dt><span class="term">minor_base</span></dt><dd><p> 17 the start of the minor range for this driver. 18 </p></dd></dl></div></div><div class="refsect1"><a name="idp1115803412"></a><h2>Description</h2><p> 19 This structure is used for the <code class="function">usb_register_dev</code> and 20 <code class="function">usb_unregister_dev</code> functions, to consolidate a number of the 21 parameters used for them. 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-device-driver.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="hostside.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-module-usb-driver.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct usb_device_driver</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">module_usb_driver</span></td></tr></table></div></body></html> 23