lkml.org 
[lkml]   [2000]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linux-usb] __initcall diff, version 2
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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.074 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site