Re: [linux-usb] __initcall diff, version 2

From: Jeff Garzik (jgarzik@mandrakesoft.mandrakesoft.com)
Date: Mon Jan 31 2000 - 15:48:04 EST


On Mon, 31 Jan 2000, Linus Torvalds wrote:
> However, instead of using "__initcall" directly, I would suggest using
> "module_init()" and "module_exit()". Which will do the right things for
> drivers whether that driver is compiled as a module or not (basically, a
> good driver these days should have NO code that is inside #ifdef MODULE
> any more).

Adding to this, for modules which require explicit init order like
fbdev, you will typically find a single ifdef:

        #ifdef MODULE
        module_init(driver_init);
        #endif
        module_exit(driver_cleanup);

Ideally you can let Makefile link order take care of these things, but
there are always special cases...

        Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:29 EST