1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>__platform_driver_probe</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="ch02s02.html" title="Device Drivers Base"><link rel="prev" href="API-platform-driver-unregister.html" title="platform_driver_unregister"><link rel="next" href="API---platform-create-bundle.html" title="__platform_create_bundle"></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">__platform_driver_probe</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-platform-driver-unregister.html">Prev</a>&#160;</td><th width="60%" align="center">Device Drivers Base</th><td width="20%" align="right">&#160;<a accesskey="n" href="API---platform-create-bundle.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API---platform-driver-probe"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>__platform_driver_probe &#8212; 
2     register driver for non-hotpluggable device
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">int <b class="fsfunc">__platform_driver_probe </b>(</code></td><td>struct platform_driver * <var class="pdparam">drv</var>, </td></tr><tr><td>&#160;</td><td>int (*<var class="pdparam">probe</var>)
4     <code>(</code>struct platform_device *<code>)</code>, </td></tr><tr><td>&#160;</td><td>struct module * <var class="pdparam">module</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1109974732"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>drv</code></em></span></dt><dd><p>
5     platform driver structure
6    </p></dd><dt><span class="term"><em class="parameter"><code>probe</code></em></span></dt><dd><p>
7     the driver probe routine, probably from an __init section
8    </p></dd><dt><span class="term"><em class="parameter"><code>module</code></em></span></dt><dd><p>
9     module which will be the owner of the driver
10    </p></dd></dl></div></div><div class="refsect1"><a name="idp1109978452"></a><h2>Description</h2><p>
11   Use this instead of <code class="function">platform_driver_register</code> when you know the device
12   is not hotpluggable and has already been registered, and you want to
13   remove its run-once <code class="function">probe</code> infrastructure from memory after the driver
14   has bound to the device.
15   </p><p>
16
17   One typical use for this would be with drivers for controllers integrated
18   into system-on-chip processors, where the controller devices have been
19   configured as part of board setup.
20   </p><p>
21
22   Note that this is incompatible with deferred probing.
23   </p><p>
24
25   Returns zero if the driver registered and bound to a device, else returns
26   a negative error code and with the driver not registered.
27</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-platform-driver-unregister.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch02s02.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API---platform-create-bundle.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">platform_driver_unregister</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">__platform_create_bundle</span></td></tr></table></div></body></html>
28