Who calls my init_module when my driver is not a module?

Sylvain Munaut tnt at 246tNt.com
Mon Mar 20 10:47:58 EST 2006


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



More information about the Linuxppc-embedded mailing list