[q] int __init init_module()?

Tigran Aivazian (tigran@sco.COM)
Thu, 26 Aug 1999 10:16:10 +0100 (BST)


Hello,

I noticed that some drivers (e.g. drivers/sound/cmpci.c) have a code like
this:

#ifdef MODULE
int __init init_module(void)
#else
int __init init_cmpci(void)
#endif
{
....

it makes sense to have __init in front of init_cmpci() but it seems rather
suspicious to have it for a module since the code for throwing away .init*
stuff is only called from free_initmem() on boot and does not seem to be
used on loading modules?

On the other hand, if it *is* needed for init_module() then plenty of
other places must be modified to have __init. So, in all cases, some
changes are required.

Regards,
Tigran.

-
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/