1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>devm_iio_trigger_alloc</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Industrial I/O driver developer's guide"><link rel="up" href="iiotrigger.html" title="Industrial I/O triggers"><link rel="prev" href="API-struct-iio-trigger.html" title="struct iio_trigger"><link rel="next" href="API-devm-iio-trigger-free.html" title="devm_iio_trigger_free"></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">devm_iio_trigger_alloc</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-iio-trigger.html">Prev</a> </td><th width="60%" align="center"> Industrial I/O triggers </th><td width="20%" align="right"> <a accesskey="n" href="API-devm-iio-trigger-free.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-devm-iio-trigger-alloc"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>devm_iio_trigger_alloc — 2 Resource-managed <code class="function">iio_trigger_alloc</code> 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"><a class="link" href="API-struct-iio-trigger.html" title="struct iio_trigger">struct iio_trigger</a> * <b class="fsfunc">devm_iio_trigger_alloc </b>(</code></td><td>struct device * <var class="pdparam">dev</var>, </td></tr><tr><td> </td><td>const char * <var class="pdparam">fmt</var>, </td></tr><tr><td> </td><td> <var class="pdparam">...</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="id-1.4.5.3.5"></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> 4 Device to allocate iio_trigger for 5 </p></dd><dt><span class="term"><em class="parameter"><code>fmt</code></em></span></dt><dd><p> 6 trigger name format. If it includes format 7 specifiers, the additional arguments following 8 format are formatted and inserted in the resulting 9 string replacing their respective specifiers. 10 </p></dd><dt><span class="term"><em class="parameter"><code>...</code></em></span></dt><dd><p> 11 variable arguments 12 </p></dd></dl></div></div><div class="refsect1"><a name="id-1.4.5.3.6"></a><h2>Description</h2><p> 13 Managed iio_trigger_alloc. iio_trigger allocated with this function is 14 automatically freed on driver detach. 15 </p><p> 16 17 If an iio_trigger allocated with this function needs to be freed separately, 18 <code class="function"><a class="link" href="API-devm-iio-trigger-free.html" title="devm_iio_trigger_free">devm_iio_trigger_free</a></code> must be used. 19</p></div><div class="refsect1"><a name="id-1.4.5.3.7"></a><h2>RETURNS</h2><p> 20 Pointer to allocated iio_trigger on success, NULL on failure. 21</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-iio-trigger.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="iiotrigger.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-devm-iio-trigger-free.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct iio_trigger</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">devm_iio_trigger_free</span></td></tr></table></div></body></html> 22