From mboxrd@z Thu Jan 1 00:00:00 1970 From: tobias@gambas-buch.de (Tobias Boege) Date: Fri, 4 Jan 2013 14:22:13 +0100 Subject: Regarding module init function In-Reply-To: References: Message-ID: <20130104132213.GB526@aurora> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Fri, 04 Jan 2013, Rahul Bedarkar wrote: > Hi, > > This may be stupid question. > > When we compile external module and insert it, it's init function is called > and when we remove it, it's exit function gets called. > > What happens in case of built-in modules? When it's init and exit is > called? May be take example of one of auxdriver. > You can find relevant information in LDD3, pp. 31 ff.. Basically, there is no difference in the use of the init function (it's called at kernel startup, I suppose) but exit is simply discarded in this case, because if your module is built-in, it could never be removed. Regards, Tobi