Subject: Re: Who calls my init_module when my driver is not a module?

From: Sylvain Munaut <[email-masked]>
Date: Mon, 20 Mar 2006 00:47:58 +0100

Antonio Di Bacco wrote:
> I wrote an SPI driver, I decided to link it against the kernel but I'm 
> wondering where my init_module will be called.
>
> Anyone knows?
>
> Bye,
> Antonio

>>From include/linux/init.h :

/**
 * module_init() - driver initialization entry point
 * @x: function to be run at kernel boot time or module insertion
 *
 * module_init() will either be called during do_initcalls (if
 * builtin) or at module insertion time (if a module).  There can only
 * be one per module.
 */
#define module_init(x)  __initcall(x);

    Sylvain