Sophie

Sophie

distrib > Fedora > 20 > x86_64 > by-pkgid > 888a2f3d4ea212b694328c0525364729 > files > 1203

kernel-doc-3.19.8-100.fc20.noarch.rpm

<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>devres_add</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="ch01s10.html" title="Device Resource Management"><link rel="prev" href="API-devres-free.html" title="devres_free"><link rel="next" href="API-devres-find.html" title="devres_find"></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">devres_add</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-devres-free.html">Prev</a>&#160;</td><th width="60%" align="center">Device Resource Management</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-devres-find.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-devres-add"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>devres_add &#8212; 
     Register device resource
 </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">void <b class="fsfunc">devres_add </b>(</code></td><td>struct device * <var class="pdparam">dev</var>, </td></tr><tr><td>&#160;</td><td>void * <var class="pdparam">res</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp305709740"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>dev</code></em></span></dt><dd><p>
     Device to add resource to
    </p></dd><dt><span class="term"><em class="parameter"><code>res</code></em></span></dt><dd><p>
     Resource to register
    </p></dd></dl></div></div><div class="refsect1"><a name="idp305712356"></a><h2>Description</h2><p>
   Register devres <em class="parameter"><code>res</code></em> to <em class="parameter"><code>dev</code></em>.  <em class="parameter"><code>res</code></em> should have been allocated
   using <code class="function">devres_alloc</code>.  On driver detach, the associated release
   function will be invoked and devres will be freed automatically.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-devres-free.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch01s10.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-devres-find.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">devres_free</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">devres_find</span></td></tr></table></div></body></html>