1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>module_init</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="Basics.html#idp1105204404" title="Driver Entry and Exit points"><link rel="prev" href="Basics.html" title="Chapter 1. Driver Basics"><link rel="next" href="API-module-exit.html" title="module_exit"></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">module_init</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="Basics.html">Prev</a> </td><th width="60%" align="center">Driver Entry and Exit points</th><td width="20%" align="right"> <a accesskey="n" href="API-module-exit.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-module-init"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>module_init — 2 driver initialization entry point 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"> <b class="fsfunc">module_init </b>(</code></td><td> <var class="pdparam">x</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1106063044"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>x</code></em></span></dt><dd><p> 4 function to be run at kernel boot time or module insertion 5 </p></dd></dl></div></div><div class="refsect1"><a name="idp1104135340"></a><h2>Description</h2><p> 6 <code class="function">module_init</code> will either be called during <code class="function">do_initcalls</code> (if 7 builtin) or at module insertion time (if a module). There can only 8 be one per module. 9</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Basics.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Basics.html#idp1105204404">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-module-exit.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 1. Driver Basics </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_exit</span></td></tr></table></div></body></html> 10