Re: Device Initialization.

James Mastros (root@jennifer-unix.dyn.ml.org)
Tue, 19 Aug 1997 16:45:08 -0400 (EDT)


On Tue, 19 Aug 1997, Pawel S. Veselov wrote:

> Hello, Mike!
>
> On Tue, 19 Aug 1997, Mike Aizatsky wrote:
>
> > Hi, all!
> >
> > I've looked at kernel sources, and I can't find a place where to
> >put a code to automatically initialize my device at startup... Where's it?
>
> Use:
> __initfunc(int your_init(<init args>))
> {
> ....
> }
>
> Init args are often "void" or "unsigned long kmem_start"
>
> This is described in <linux/init.h>
>
> Bye.

Nope. That just marks that the function's memory should be relesed just
before /sbin/init (or whatever) is called. To call a function at boottime,
put a call to it around line 896 in init/main.c, or in one of those functions.
Also look around line 41 of fs/filesystems.c, and I'm shure some other
places that I can't find right now.

-=- James Mastros