1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>dmi_find_device</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The Linux Kernel API"><link rel="up" href="firmware.html#idp1127298468" title="DMI Interfaces"><link rel="prev" href="API-dmi-name-in-vendors.html" title="dmi_name_in_vendors"><link rel="next" href="API-dmi-get-date.html" title="dmi_get_date"></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">dmi_find_device</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-dmi-name-in-vendors.html">Prev</a> </td><th width="60%" align="center">DMI Interfaces</th><td width="20%" align="right"> <a accesskey="n" href="API-dmi-get-date.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-dmi-find-device"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>dmi_find_device — 2 find onboard device by type/name 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">const struct dmi_device * <b class="fsfunc">dmi_find_device </b>(</code></td><td>int <var class="pdparam">type</var>, </td></tr><tr><td> </td><td>const char * <var class="pdparam">name</var>, </td></tr><tr><td> </td><td>const struct dmi_device * <var class="pdparam">from</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1127332668"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>type</code></em></span></dt><dd><p> 4 device type or <code class="constant">DMI_DEV_TYPE_ANY</code> to match all device types 5 </p></dd><dt><span class="term"><em class="parameter"><code>name</code></em></span></dt><dd><p> 6 device name string or <code class="constant">NULL</code> to match all 7 </p></dd><dt><span class="term"><em class="parameter"><code>from</code></em></span></dt><dd><p> 8 previous device found in search, or <code class="constant">NULL</code> for new search. 9 </p></dd></dl></div></div><div class="refsect1"><a name="idp1127337060"></a><h2>Description</h2><p> 10 Iterates through the list of known onboard devices. If a device is 11 found with a matching <em class="parameter"><code>vendor</code></em> and <em class="parameter"><code>device</code></em>, a pointer to its device 12 structure is returned. Otherwise, <code class="constant">NULL</code> is returned. 13 A new search is initiated by passing <code class="constant">NULL</code> as the <em class="parameter"><code>from</code></em> argument. 14 If <em class="parameter"><code>from</code></em> is not <code class="constant">NULL</code>, searches continue from next device. 15</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-dmi-name-in-vendors.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="firmware.html#idp1127298468">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-dmi-get-date.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">dmi_name_in_vendors</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">dmi_get_date</span></td></tr></table></div></body></html> 16